Add healthchecks and enable rolling updates for the nodejs service #9

Merged
decentral1se merged 2 commits from app-healthcheck into main 2021-07-15 19:09:24 +00:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit fe7aace9d7 - Show all commits

View File

@ -59,6 +59,12 @@ services:
target: /docker-entrypoint.sh
mode: 0555
command: npm start
healthcheck:
test: 'nodejs -e "http.get(''http://localhost:9000/api/v1/ping'', (res) => { console.log(''status: '', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } });"'
interval: 1m
timeout: 30s
retries: 3
start_period: 1m
entrypoint: /docker-entrypoint.sh
networks:
- internal