diff --git a/Dockerfile b/Dockerfile index 14e0149..449affe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,20 @@ ENV PATH /app/node_modules/.bin:$PATH ENV GENERATE_SOURCEMAP=false ENV NODE_OPTIONS=--openssl-legacy-provider -COPY .npmrc ./ +ARG ENV_FILE +ENV ENV_FILE=${ENV_FILE} + +# COPY .npmrc ./ COPY package.json ./ COPY package-lock.json ./ -RUN npm install --legacy-peer-dep + +RUN npm install --legacy-peer-deps + COPY . ./ +COPY ${ENV_FILE} .env + RUN npm run build -# production environment FROM nginx:stable-alpine COPY --from=build /app/build /usr/share/nginx/html COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf