update build script to use regions instead of prod/alt, just single build for docker, remove bun start up

This commit is contained in:
Evan
2025-03-17 13:30:48 -07:00
parent cd1f8b9586
commit da1b3dbf4b
4 changed files with 32 additions and 47 deletions
+4 -24
View File
@@ -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