mruniquehacker commited on
Commit
1bf371c
·
verified ·
1 Parent(s): 69a8d02

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -26,12 +26,12 @@ RUN yarn install --network-concurrency 1
26
  # Set permissions for app directory
27
  RUN chmod -R 777 /app
28
 
29
- # Add custom DNS resolvers
30
- RUN echo "nameserver 8.8.8.8\nnameserver 8.8.4.4" > /etc/resolv.conf
31
-
32
  # Create session directory
33
  RUN mkdir -p /app/session && chmod -R 777 /app/session
34
 
 
 
 
35
  # Expose port for Hugging Face
36
  EXPOSE 7860
37
 
@@ -39,10 +39,11 @@ EXPOSE 7860
39
  ENV NODE_ENV=production
40
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
41
  ENV HOSTTYPE=x64
 
42
 
43
  # Add healthcheck
44
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
45
  CMD curl -f http://localhost:7860/ || exit 1
46
 
47
- # Start the bot with DNS resolution check
48
- CMD ["sh", "-c", "dig web.whatsapp.com && node index.js"]
 
26
  # Set permissions for app directory
27
  RUN chmod -R 777 /app
28
 
 
 
 
29
  # Create session directory
30
  RUN mkdir -p /app/session && chmod -R 777 /app/session
31
 
32
+ # Create a custom resolv.conf in the app directory
33
+ RUN echo "nameserver 8.8.8.8\nnameserver 8.8.4.4\nnameserver 1.1.1.1" > /app/resolv.conf
34
+
35
  # Expose port for Hugging Face
36
  EXPOSE 7860
37
 
 
39
  ENV NODE_ENV=production
40
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
41
  ENV HOSTTYPE=x64
42
+ ENV RESOLV_CONF=/app/resolv.conf
43
 
44
  # Add healthcheck
45
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
46
  CMD curl -f http://localhost:7860/ || exit 1
47
 
48
+ # Start the bot with DNS checks
49
+ CMD ["sh", "-c", "node index.js"]