浏览代码

add docker health check

Richard Köhl 2 年之前
父节点
当前提交
453eff7479
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      docker-compose.yml

+ 5 - 0
docker-compose.yml

@@ -13,3 +13,8 @@ services:
     volumes:
       - ./src:/app/src:ro
     command: ["deno", "task", "dev"]
+    healthcheck:
+      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:1993/health"]
+      interval: 10s
+      timeout: 2s
+      retries: 3