coyotte508 HF staff commited on
Commit
000ed50
1 Parent(s): 690db3e

Use all CPUs in prod (#57)

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -3,6 +3,8 @@
3
 
4
  FROM node:19
5
 
 
 
6
  WORKDIR /app
7
 
8
  COPY . .
@@ -17,4 +19,4 @@ RUN npm run build
17
 
18
  ENV PORT 7860
19
 
20
- CMD ["node", "build"]
 
3
 
4
  FROM node:19
5
 
6
+ RUN npm install -g pm2
7
+
8
  WORKDIR /app
9
 
10
  COPY . .
 
19
 
20
  ENV PORT 7860
21
 
22
+ CMD ["pm2", "start", "build/index.js" ,"-i", "2", "--no-daemon"]