feat: add docker healthcheck on /health

This commit is contained in:
Hermes committed 2026-08-09 23:22:41 +02:00
1 parent d19587dd88
commit b501824fe9
1 file changed
+6
+6
View File
@@ -8,6 +8,12 @@ services:
restart: unless-stopped
expose:
- '8000'
healthcheck:
test: ['CMD', 'python', '-c', "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/health',timeout=3).status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
environment:
APP_DIR: /data/app
DEPLOY_WEBHOOK: '${DEPLOY_WEBHOOK}'