-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 854 Bytes
/
Dockerfile
File metadata and controls
37 lines (26 loc) · 854 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
26
27
28
29
30
31
32
33
34
35
36
37
############################################################################
FROM alpine AS source-container
WORKDIR /app
COPY . ./.
############################################################################
FROM node:14 AS build-backend
ENV NODE_ENV=production
COPY --from=source-container /app /app
WORKDIR /app/src
RUN yarn install
############################################################################
FROM node:lts-alpine AS build-frontend
USER root
COPY --from=source-container /app /app
WORKDIR /app/src/webclient
RUN yarn install
RUN yarn build
############################################################################
FROM node:14
ENV NODE_ENV=production
WORKDIR /app/src
RUN mkdir public
COPY --from=build-backend /app/src ./
COPY --from=build-frontend /app/src/webclient/dist ./public
EXPOSE 8080
CMD [ "node", "app.js" ]