Skip to content

Commit 84a070b

Browse files
authored
fix: dockerfile (#215)
1 parent 15d6c9f commit 84a070b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
FROM node:14
1+
FROM node:14 as build
22
WORKDIR /usr/src/app
33
# Do `npm ci` separately so we can cache `node_modules`
44
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
5-
COPY package*.json ./
5+
COPY package.json package-lock.json .
66
RUN npm clean-install
77
COPY . .
88
RUN npm run build:server
9+
10+
FROM node:14-slim
11+
WORKDIR /usr/src/app
12+
COPY --from=build /usr/src/app/node_modules node_modules
13+
COPY --from=build /usr/src/app/bin bin
14+
COPY package.json ./
915
ENV PG_META_PORT=8080
1016
CMD ["npm", "run", "start"]
1117
EXPOSE 8080

0 commit comments

Comments
 (0)