From d32eca57371f9368ff80eb2578b237896de855cf Mon Sep 17 00:00:00 2001 From: Ilia Eriomenco <ilia.eriomenco@endava.com> Date: Mon, 29 Mar 2021 13:56:46 +0000 Subject: [PATCH] Update Dockerfile-production --- Dockerfile-production | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile-production b/Dockerfile-production index 1e9a840db0..38d462b078 100644 --- a/Dockerfile-production +++ b/Dockerfile-production @@ -18,7 +18,19 @@ RUN yarn install --frozen-lockfile --production=false COPY . . +RUN yarn webpack --config webpack/webpack.production.config.js + +# IMAGE FOR RUNNING +FROM node:15.11-alpine as server + ARG instance_name +ARG node_env +ARG server_protocol +ARG server_host +ARG server_port +ARG client_protocol +ARG client_host +ARG client_port ENV INSTANCE_NAME $instance_name ENV NODE_ENV "production" @@ -29,11 +41,6 @@ ENV CLIENT_PROTOCOL "http" ENV CLIENT_HOST "0.0.0.0" ENV CLIENT_PORT "4000" -RUN yarn webpack --config webpack/webpack.production.config.js - -# IMAGE FOR RUNNING -FROM node:15.11-alpine as server - WORKDIR /home/node/app RUN chown -R node:node . -- GitLab