From 352f1a3e236f17ca917bbd1e85ac6173a6ea234d Mon Sep 17 00:00:00 2001 From: ztimson Date: Mon, 2 May 2022 21:49:10 -0400 Subject: [PATCH] Fixed dockerfile --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 209d090..9fb74b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,9 @@ RUN npm config set unsafe-perm true && \ WORKDIR /app COPY . . -# Install -RUN if [ ! -d "dist" ] && [ ! -d "node_modules" ]; then npm install; fi - -# Build -if [ ! -d "dist" ]; then npm run build; fi +# Install & build +RUN if [ ! -d "dist" ] && [ ! -d "node_modules" ]; then npm install; fi \ + if [ ! -d "dist" ]; then npm run build; fi # Use Nginx to serve FROM nginx:1.20-alpine