-
Notifications
You must be signed in to change notification settings - Fork 205
/
Dockerfile
34 lines (31 loc) · 980 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:lts-alpine as public_app_build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY public_app/package.json ./
COPY public_app/package-lock.json ./
RUN npm install --silent
COPY public_app ./
RUN npm run build
FROM node:lts-alpine as portal_app_build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY portal/package.json ./
COPY portal/package-lock.json ./
RUN npm install --silent
COPY portal ./
RUN npm run build
FROM node:lts-alpine as facility_app_build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY mobile/package.json ./
COPY mobile/package-lock.json ./
RUN npm install --silent
COPY mobile ./
RUN npm run build
FROM nginx:stable-alpine
COPY --from=public_app_build /app/build /usr/share/nginx/html
COPY --from=portal_app_build /app/build /usr/share/nginx/html/portal
COPY --from=facility_app_build /app/build /usr/share/nginx/html/facility_app
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]