kamiwork commited on
Commit
7f20532
·
verified ·
1 Parent(s): 940b75e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -5
Dockerfile CHANGED
@@ -1,16 +1,23 @@
1
- # TraffMonetizer ki Alpine-based image use karein
2
  FROM traffmonetizer/cli_v2:latest
3
 
4
- # Alpine pe Node.js aur npm install karein
5
  RUN apk add --no-cache nodejs npm
6
 
7
  WORKDIR /app
8
 
9
- # Apna Express app copy karein
10
  COPY package.json index.js ./
 
 
11
  RUN npm install --omit=dev
12
 
13
  EXPOSE 7860
14
 
15
- # Dono processes ko run karein. '&' se background aur 'exec' se foreground process sahi rahega.
16
- CMD ["sh", "-c", "start accept --token $TOKEN & exec node index.js"]
 
 
 
 
 
 
 
 
1
  FROM traffmonetizer/cli_v2:latest
2
 
3
+ # Install Node.js
4
  RUN apk add --no-cache nodejs npm
5
 
6
  WORKDIR /app
7
 
8
+ # Copy package.json and index.js
9
  COPY package.json index.js ./
10
+
11
+ # Install Express
12
  RUN npm install --omit=dev
13
 
14
  EXPOSE 7860
15
 
16
+ # Run with better logging
17
+ CMD ["sh", "-c", "
18
+ echo '🚀 Starting TraffMonetizer...'
19
+ start accept --token $TOKEN &
20
+ echo '✅ TraffMonetizer started in background'
21
+ echo '🚀 Starting Express server...'
22
+ exec node index.js
23
+ "]