ncolex commited on
Commit
0f2b3aa
·
verified ·
1 Parent(s): 4c653b1

Fix health check - increase start-period to 120s, use curl

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -76,9 +76,9 @@ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
76
 
77
  USER pwuser
78
 
79
- # Health check - use wget instead of curl (more reliable in containers)
80
- HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
81
- CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/')" || exit 1
82
 
83
  # Run the application using entrypoint
84
  ENTRYPOINT ["/entrypoint.sh"]
 
76
 
77
  USER pwuser
78
 
79
+ # Health check - give app more time to start (120 seconds)
80
+ HEALTHCHECK --interval=10s --timeout=10s --start-period=120s --retries=5 \
81
+ CMD curl -f http://localhost:8000/ || exit 1
82
 
83
  # Run the application using entrypoint
84
  ENTRYPOINT ["/entrypoint.sh"]