We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15d6c9f commit 84a070bCopy full SHA for 84a070b
Dockerfile
@@ -1,11 +1,17 @@
1
-FROM node:14
+FROM node:14 as build
2
WORKDIR /usr/src/app
3
# Do `npm ci` separately so we can cache `node_modules`
4
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
5
-COPY package*.json ./
+COPY package.json package-lock.json .
6
RUN npm clean-install
7
COPY . .
8
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 ./
15
ENV PG_META_PORT=8080
16
CMD ["npm", "run", "start"]
17
EXPOSE 8080
0 commit comments