use save=dev when building

This commit is contained in:
Evan
2025-02-28 08:18:37 -08:00
parent c462fe74f4
commit b2dc564818
+3 -2
View File
@@ -4,7 +4,6 @@ FROM node:18
# Add environment variable
ARG GAME_ENV=preprod
ENV GAME_ENV=$GAME_ENV
ENV NODE_ENV=production
# Install Nginx, Supervisor and Git (for Husky)
RUN apt-get update && apt-get install -y nginx supervisor git && \
@@ -19,7 +18,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
RUN mkdir -p .git && npm install --include=dev
# Copy the rest of the application code
COPY . .
@@ -27,6 +26,8 @@ COPY . .
# Build the client-side application
RUN npm run build-prod
ENV NODE_ENV=production
# 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