-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (22 loc) · 904 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
35
36
37
###############################################################################
### Pre-Build ###
###############################################################################
FROM node:17.5.0-alpine3.14 as build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
###############################################################################
### Build ###
###############################################################################
FROM node:17.5.0-alpine3.14
ARG NODE_ENV=Production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
COPY --from=build /app/dist ./dist
COPY --from=build /app/src/migrations ./src/migrations
CMD ["npm", "run", "start:prod"]