mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
refactor docker files
This commit is contained in:
parent
11a3111098
commit
57671c444c
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -24,7 +24,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -33,7 +34,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -42,7 +44,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -52,7 +55,8 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
RUN mkdir /usr/src/CommonUI
|
||||
|
||||
FROM Base AS CommonUI
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
@ -61,11 +65,25 @@ COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=CommonUI /usr/src/CommonUI .
|
||||
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -24,7 +24,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -32,7 +33,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -41,7 +43,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -51,7 +54,8 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
RUN mkdir /usr/src/CommonUI
|
||||
|
||||
FROM Base AS CommonUI
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
@ -59,11 +63,25 @@ COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=CommonUI /usr/src/CommonUI .
|
||||
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -20,7 +20,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -28,7 +29,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -37,7 +39,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -47,8 +50,6 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -24,7 +24,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -32,7 +33,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -41,7 +43,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -51,7 +54,8 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
RUN mkdir /usr/src/CommonUI
|
||||
|
||||
FROM Base AS CommonUI
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
@ -59,11 +63,24 @@ COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=CommonUI /usr/src/CommonUI .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,7 +47,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -54,9 +57,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,19 +47,28 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -20,7 +20,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -28,7 +29,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -37,7 +39,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -45,8 +48,6 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -16,6 +16,18 @@ ENV APP_VERSION=${APP_VERSION}
|
||||
|
||||
|
||||
#SET ENV Variables.
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
@ -29,7 +41,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -37,7 +50,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,15 +59,14 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,7 +47,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -54,9 +57,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,7 +47,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -54,9 +57,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -24,7 +24,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -32,7 +33,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -41,7 +43,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -50,11 +53,21 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -44,7 +46,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -53,9 +56,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -24,7 +24,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -32,7 +33,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -41,7 +43,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -50,12 +53,22 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV CHROME_PATH=/usr/bin/chromium
|
||||
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -31,7 +31,8 @@ RUN apk add iputils
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -39,7 +40,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -48,7 +50,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -57,9 +60,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,7 +47,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -54,9 +57,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -15,6 +15,18 @@ ENV APP_VERSION=${APP_VERSION}
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
# Install bash.
|
||||
@ -27,7 +39,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -35,7 +48,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -44,7 +58,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -52,8 +67,6 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -25,7 +25,8 @@ RUN npm install http-server -g
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -33,7 +34,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -42,7 +44,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -50,7 +53,8 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
RUN mkdir /usr/src/CommonUI
|
||||
|
||||
FROM Base AS CommonUI
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
@ -59,11 +63,24 @@ COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=CommonUI /usr/src/CommonUI .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -45,7 +47,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -54,9 +57,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -31,7 +31,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -39,7 +40,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -48,7 +50,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -57,9 +60,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine
|
||||
FROM node:current-alpine as Base
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
@ -28,7 +28,8 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
|
||||
FROM Base AS Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
@ -36,7 +37,8 @@ COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
|
||||
FROM Base AS Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
@ -44,7 +46,8 @@ COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
|
||||
FROM Base AS CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
@ -53,9 +56,19 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
# Install app
|
||||
FROM Base AS App
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=Common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=Model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=CommonServer /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user