feat: add docker healthcheck on /health
This commit is contained in:
1 parent
d19587dd88
commit
b501824fe9
1 file changed
+6
@@ -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}'
|
||||
|
||||
Reference in new issue
Block a user