2019-08-02 12:56:16 +00:00
|
|
|
#
|
|
|
|
# Accounts Dockerfile
|
|
|
|
#
|
|
|
|
|
|
|
|
# Pull base image nodejs image.
|
2022-03-15 21:44:43 +00:00
|
|
|
FROM node:alpine
|
2019-08-02 12:56:16 +00:00
|
|
|
|
2022-01-18 12:34:39 +00:00
|
|
|
# Install bash.
|
|
|
|
RUN apk update && apk add bash && apk add curl
|
|
|
|
|
2021-08-08 12:02:26 +00:00
|
|
|
#Use bash shell by default
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
2022-04-22 20:28:36 +00:00
|
|
|
RUN npm install typescript -g
|
2021-08-08 12:02:26 +00:00
|
|
|
|
2022-03-01 19:36:15 +00:00
|
|
|
RUN mkdir /usr/src
|
2022-03-22 11:23:38 +00:00
|
|
|
|
|
|
|
# Install common
|
2022-04-22 20:12:57 +00:00
|
|
|
RUN mkdir /usr/src/Common
|
|
|
|
WORKDIR /usr/src/Common
|
|
|
|
COPY ./Common/package*.json /usr/src/Common/
|
2022-03-22 11:23:38 +00:00
|
|
|
RUN npm install
|
2022-04-22 20:12:57 +00:00
|
|
|
COPY ./Common /usr/src/Common
|
2022-04-22 20:17:50 +00:00
|
|
|
RUN npm run compile
|
2022-03-22 11:23:38 +00:00
|
|
|
|
2022-04-11 13:11:16 +00:00
|
|
|
# Install CommonServer
|
|
|
|
RUN mkdir /usr/src/CommonServer
|
|
|
|
WORKDIR /usr/src/CommonServer
|
|
|
|
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
2022-03-15 21:57:13 +00:00
|
|
|
RUN npm install
|
2022-04-11 13:11:16 +00:00
|
|
|
COPY ./CommonServer /usr/src/CommonServer
|
2022-04-22 20:17:50 +00:00
|
|
|
RUN npm run compile
|
2022-03-01 19:36:15 +00:00
|
|
|
|
2022-03-22 11:23:38 +00:00
|
|
|
|
2022-04-11 13:11:16 +00:00
|
|
|
# Install CommonUI
|
|
|
|
RUN mkdir /usr/src/CommonUI
|
|
|
|
WORKDIR /usr/src/CommonUI
|
|
|
|
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
2022-03-22 11:23:38 +00:00
|
|
|
RUN npm install
|
2022-04-11 13:11:16 +00:00
|
|
|
COPY ./CommonUI /usr/src/CommonUI
|
2022-04-22 20:17:50 +00:00
|
|
|
RUN npm run compile
|
2022-03-22 11:23:38 +00:00
|
|
|
|
|
|
|
|
2019-08-02 12:56:16 +00:00
|
|
|
#SET ENV Variables
|
|
|
|
ENV PRODUCTION=true
|
2020-05-25 19:58:05 +00:00
|
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
2019-08-02 12:56:16 +00:00
|
|
|
|
2022-01-18 12:34:39 +00:00
|
|
|
RUN mkdir /usr/src/app
|
2019-08-02 12:56:16 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# Install app dependencies
|
2022-04-22 20:12:57 +00:00
|
|
|
COPY ./Accounts/package*.json /usr/src/app/
|
2022-03-15 21:57:13 +00:00
|
|
|
RUN npm install
|
2022-02-27 11:51:35 +00:00
|
|
|
RUN npm install -g ts-node
|
2019-08-02 12:56:16 +00:00
|
|
|
|
|
|
|
# Copy app source
|
2022-04-22 20:12:57 +00:00
|
|
|
COPY ./Accounts /usr/src/app
|
2019-08-02 12:56:16 +00:00
|
|
|
|
|
|
|
# Bundle app source
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# Expose ports.
|
|
|
|
# - 3003: accounts
|
|
|
|
EXPOSE 3003
|
|
|
|
|
|
|
|
#Run the app
|
|
|
|
CMD [ "npm", "start" ]
|