Praveen76 commited on
Commit
05cf042
·
verified ·
1 Parent(s): d608ab0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -10,8 +10,8 @@ RUN pip install --upgrade pip
10
  # Install dependencies
11
  RUN pip install -r requirements.txt
12
 
13
- # Install ngrok
14
- RUN apt-get update && apt-get install -y unzip \
15
  && curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc \
16
  && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list \
17
  && apt-get update && apt-get install ngrok
@@ -22,5 +22,8 @@ COPY app/. /app/.
22
  # Expose port for application
23
  EXPOSE 8001
24
 
25
- # Start ngrok and the flask application
 
 
 
26
  CMD ngrok http 8001 --log=stdout & python /app/main.py
 
10
  # Install dependencies
11
  RUN pip install -r requirements.txt
12
 
13
+ # Install ngrok and DNS utilities
14
+ RUN apt-get update && apt-get install -y unzip dnsutils \
15
  && curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc \
16
  && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list \
17
  && apt-get update && apt-get install ngrok
 
22
  # Expose port for application
23
  EXPOSE 8001
24
 
25
+ # Add a health check for DNS resolution
26
+ HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD nslookup connect.ngrok-agent.com || exit 1
27
+
28
+ # Start ngrok and the Flask application
29
  CMD ngrok http 8001 --log=stdout & python /app/main.py