-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (31 loc) · 905 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
FROM node AS build-common
WORKDIR /app
COPY web-common web-common
WORKDIR /app/web-common
#RUN apt install yarn
RUN yarn
RUN yarn build
FROM node AS build-admin
WORKDIR /app
COPY --from=build-common /app/web-common /app/web-common
RUN mkdir -p /app/web-admin
COPY web-admin/package.json web-admin/yarn.lock web-admin/
WORKDIR /app/web-admin
RUN yarn
COPY web-admin .
RUN yarn build
FROM node AS build-studi
WORKDIR /app
COPY --from=build-common /app/web-common /app/web-common
RUN mkdir -p /app/web-studi
COPY web-studi/package.json web-studi/yarn.lock web-studi/
WORKDIR /app/web-studi
RUN yarn
COPY web-studi .
RUN yarn build
FROM nginx AS runtime
RUN mkdir -p /app/web-admin/build
RUN mkdir -p /app/web-studi/build
COPY --from=build-admin /app/web-admin/build /app/web-admin/build
COPY --from=build-studi /app/web-studi/build /app/web-studi/build
COPY misc/site-react-docker.conf /etc/nginx/nginx.conf