diff --git a/docker-compose.yaml b/docker-compose.yaml index cd8c427..8dbf891 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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}'