-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 825 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 825 Bytes
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
FROM node:16-alpine as build
WORKDIR /opt/planning-chess
ADD . .
RUN npm i
RUN npm run bootstrap
RUN npm run build
RUN npm i --production
WORKDIR /opt/planning-chess/api
RUN npm i --production
FROM node:16-alpine
WORKDIR /opt/planning-chess
COPY --from=build /opt/planning-chess/services/shared /opt/planning-chess/services/shared
COPY --from=build /opt/planning-chess/services/app/dist /opt/planning-chess/services/app/dist
COPY --from=build /opt/planning-chess/services/api/dist/src /opt/planning-chess/services/api/dist/src
COPY --from=build /opt/planning-chess/services/api/node_modules /opt/planning-chess/services/api/node_modules
COPY --from=build /opt/planning-chess/node_modules /opt/planning-chess/node_modules
# ADD services/api/.env api/
EXPOSE 8081
CMD ["node", "/opt/planning-chess/services/api/dist/src"]