stnh70 commited on
Commit
f29eb0d
·
verified ·
1 Parent(s): a2f8239

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -12,5 +12,9 @@ RUN deno cache deno.ts
12
  # 设置入口点,指向thunderapi子目录中的文件
13
  ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write", "deno.ts"]
14
 
 
 
 
 
15
  # Hugging Face Spaces使用7860端口
16
  EXPOSE 7860
 
12
  # 设置入口点,指向thunderapi子目录中的文件
13
  ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write", "deno.ts"]
14
 
15
+ # 设置健康检查
16
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
17
+ CMD curl -f http://localhost:7860 || exit 1
18
+
19
  # Hugging Face Spaces使用7860端口
20
  EXPOSE 7860