Trigger82 commited on
Commit
45d6906
·
verified ·
1 Parent(s): c7a1be8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -1,12 +1,17 @@
1
- FROM node:18
2
 
3
  WORKDIR /app
4
 
 
 
 
5
  COPY package*.json ./
6
  RUN npm install
7
 
8
  COPY . .
9
 
 
10
  EXPOSE 7860
11
 
12
- CMD ["node", "server.js"]
 
 
1
+ FROM node:23
2
 
3
  WORKDIR /app
4
 
5
+ # Install PM2 globally for process management
6
+ RUN npm install -g pm2
7
+
8
  COPY package*.json ./
9
  RUN npm install
10
 
11
  COPY . .
12
 
13
+ # Expose the main port
14
  EXPOSE 7860
15
 
16
+ # Start the application using PM2 to ensure 24/7 operation
17
+ CMD ["pm2-runtime", "start", "server.js"]