File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
- FROM node:14
1
+ FROM node:14-alpine as deps
2
+ RUN apk add --no-cache bash make git python3
3
+ RUN apk add --update alpine-sdk
2
4
WORKDIR /usr/src/app
3
5
# Do `npm ci` separately so we can cache `node_modules`
4
6
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
5
7
COPY package*.json ./
6
8
RUN npm clean-install
9
+
10
+ FROM node:14-alpine as build
11
+ WORKDIR /usr/src/app
12
+ COPY --from=deps /usr/src/app/node_modules ./node_modules
7
13
COPY . .
8
14
RUN npm run build:server
15
+
16
+ FROM node:14-alpine as prod
17
+ WORKDIR /usr/src/app
18
+ COPY --from=deps /usr/src/app/node_modules ./node_modules
19
+ COPY --from=build /usr/src/app/bin ./bin
20
+ COPY package.json ./
9
21
ENV PG_META_PORT=8080
10
22
CMD ["npm" , "run" , "start" ]
11
23
EXPOSE 8080
You can’t perform that action at this time.
0 commit comments