Use native NodeJS healthcheck
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2021-04-24 19:44:55 +02:00
parent 719697d26b
commit 33414afde2
1 changed files with 4 additions and 4 deletions

View File

@ -7,11 +7,11 @@ services:
networks:
- proxy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 10s
test: "nodejs -e \"http.get('http://localhost:8000', (res) => { console.log('status: ', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } });\""
interval: 30s
timeout: 10s
retries: 10
start_period: 15s
retries: 3
start_period: 1m
deploy:
update_config:
failure_action: rollback