henztech commited on
Commit
5826c5c
·
verified ·
1 Parent(s): ff912e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -30
Dockerfile CHANGED
@@ -1,39 +1,15 @@
1
- FROM node:18-alpine
2
 
3
- # Install system dependencies
4
- RUN apk add --no-cache git python3 make g++ curl
5
-
6
- # Clone repository
7
- RUN git clone https://github.com/EMMYHENZ-TECH/Coinbase-About /app
8
-
9
- # Set working directory
10
  WORKDIR /app
11
 
12
- # Create persistent data directory (using /data for Hugging Face persistence)
13
- RUN mkdir -p /data && \
14
- chown -R node:node /data && \
15
- chmod -R 755 /data
16
-
17
- # Install dependencies
18
- RUN npm install
19
 
20
- # Install PM2 process manager globally
21
- RUN npm install -g pm2
22
 
23
- # Switch to non-root user
24
- USER node
25
 
26
- # Environment variables
27
- ENV PORT=7860
28
- ENV NODE_ENV=production
29
- ENV HOST=0.0.0.0
30
- ENV PERSISTENT_STORAGE_DIR=/data
31
 
32
  EXPOSE 7860
33
 
34
- # Health check
35
- HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
36
- CMD curl -f http://localhost:7860/ || exit 1
37
-
38
- # Start with PM2 for process management (auto-restart if crashes)
39
- CMD ["pm2-runtime", "server.js"]
 
1
+ FROM node:23-bullseye
2
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
+ RUN https://github.com/EMMYHENZ-TECH/Coinbase-About /app
 
 
 
 
 
 
6
 
7
+ RUN chmod -R 777 /app
 
8
 
9
+ WORKDIR /app
 
10
 
11
+ RUN npm install
 
 
 
 
12
 
13
  EXPOSE 7860
14
 
15
+ CMD ["node", "server.js"]