stnh70 commited on
Commit
2daf0fe
·
verified ·
1 Parent(s): 53bd6e3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -21,5 +21,9 @@ EXPOSE 7860
21
  # Environment variable for proxy (optional)
22
  ENV HTTP_PROXY=""
23
 
 
 
 
 
24
  # Command to run the application
25
  CMD ["python", "main.py"]
 
21
  # Environment variable for proxy (optional)
22
  ENV HTTP_PROXY=""
23
 
24
+ # 设置健康检查
25
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
26
+ CMD curl -f http://localhost:7860 || exit 1
27
+
28
  # Command to run the application
29
  CMD ["python", "main.py"]