From b2dc564818233681c23d7d32d34d98f6db34d46a Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 28 Feb 2025 08:18:37 -0800 Subject: [PATCH] use save=dev when building --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05b749124..44d05727f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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