mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:50:43 +00:00
update build script to use regions instead of prod/alt, just single build for docker, remove bun start up
This commit is contained in:
+4
-24
@@ -4,8 +4,9 @@ FROM node:18
|
||||
ARG GIT_COMMIT=unknown
|
||||
ENV GIT_COMMIT=$GIT_COMMIT
|
||||
|
||||
# Set the working directory for the build
|
||||
WORKDIR /build
|
||||
# Install Nginx, Supervisor and Git (for Husky)
|
||||
RUN apt-get update && apt-get install -y nginx supervisor git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /usr/src/app
|
||||
@@ -16,7 +17,7 @@ COPY package*.json ./
|
||||
# Install dependencies while bypassing Husky hooks
|
||||
ENV HUSKY=0
|
||||
ENV NPM_CONFIG_IGNORE_SCRIPTS=1
|
||||
RUN mkdir -p .git && npm install --include=dev
|
||||
RUN mkdir -p .git && npm install
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
@@ -24,27 +25,6 @@ COPY . .
|
||||
# Build the client-side application
|
||||
RUN npm run build-prod
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ARG GIT_COMMIT=unknown
|
||||
ENV GIT_COMMIT=$GIT_COMMIT
|
||||
|
||||
# Install Nginx, Supervisor and Git (for Husky)
|
||||
RUN apt-get update && apt-get install -y nginx supervisor && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy output files from builder (using the correct 'static' directory)
|
||||
COPY --from=builder /build/static ./static
|
||||
COPY --from=builder /build/node_modules ./node_modules
|
||||
COPY --from=builder /build/package.json ./package.json
|
||||
COPY --from=builder /build/bun.lock ./bun.lock
|
||||
|
||||
# Copy server files
|
||||
COPY --from=builder /build/src ./src
|
||||
|
||||
|
||||
# Copy Nginx configuration and ensure it's used instead of the default
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
RUN rm -f /etc/nginx/sites-enabled/default
|
||||
|
||||
Reference in New Issue
Block a user