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: networks:
- proxy - proxy
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] 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: 10s interval: 30s
timeout: 10s timeout: 10s
retries: 10 retries: 3
start_period: 15s start_period: 1m
deploy: deploy:
update_config: update_config:
failure_action: rollback failure_action: rollback