Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ RUN npm ci
RUN npm run build

FROM node:14-alpine
RUN npm install -g pm2
WORKDIR /app
COPY migrations migrations
COPY package.json .
COPY ecosystem.config.js package.json .
COPY --from=0 /app/node_modules node_modules
COPY --from=1 /app/dist dist
EXPOSE 5000
CMD ["npm", "run", "start"]
CMD ["pm2-runtime", "ecosystem.config.js"]
10 changes: 10 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
apps: [
{
env: {
NODE_ENV: 'production',
},
script: 'dist/server.js',
},
],
}