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.
Dockerfile
1 parent 1e55aa3 commit 29e62eaCopy full SHA for 29e62ea
2 files changed
Dockerfile
@@ -12,10 +12,11 @@ RUN npm ci
12
RUN npm run build
13
14
FROM node:14-alpine
15
+RUN npm install -g pm2
16
WORKDIR /app
17
COPY migrations migrations
-COPY package.json .
18
+COPY ecosystem.config.js package.json .
19
COPY --from=0 /app/node_modules node_modules
20
COPY --from=1 /app/dist dist
21
EXPOSE 5000
-CMD ["npm", "run", "start"]
22
+CMD ["pm2-runtime", "ecosystem.config.js"]
ecosystem.config.js
@@ -0,0 +1,10 @@
1
+module.exports = {
2
+ apps: [
3
+ {
4
+ env: {
5
+ NODE_ENV: 'production',
6
+ },
7
+ script: 'dist/server.js',
8
9
+ ],
10
+}
0 commit comments