Trigger82 commited on
Commit
d1e87e3
·
verified ·
1 Parent(s): 8e2568e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -13
Dockerfile CHANGED
@@ -1,26 +1,21 @@
1
- FROM node:23
2
 
3
  # Create app directory with proper permissions
4
  RUN mkdir -p /app/users && chown -R node:node /app
5
  WORKDIR /app
6
 
7
- # Install PM2 globally (no keys needed for basic usage)
8
- RUN npm install -g pm2
9
-
10
- # Switch to non-root user
11
- USER node
12
-
13
- # Copy package files first for better caching
14
- COPY --chown=node:node package*.json ./
15
-
16
- # Install dependencies
17
  RUN npm install
18
 
19
  # Copy application files
20
  COPY --chown=node:node . .
21
 
 
 
 
22
  # Expose the port
23
  EXPOSE 7860
24
 
25
- # Start the application (no PM2 keys required)
26
- CMD ["pm2-runtime", "--no-daemon", "server.js"]
 
1
+ FROM node:23-alpine
2
 
3
  # Create app directory with proper permissions
4
  RUN mkdir -p /app/users && chown -R node:node /app
5
  WORKDIR /app
6
 
7
+ # Install dependencies first for better caching
8
+ COPY package*.json ./
 
 
 
 
 
 
 
 
9
  RUN npm install
10
 
11
  # Copy application files
12
  COPY --chown=node:node . .
13
 
14
+ # Switch to non-root user
15
+ USER node
16
+
17
  # Expose the port
18
  EXPOSE 7860
19
 
20
+ # Simple startup command
21
+ CMD ["node", "server.js"]