Merge pull request 'Add healthchecks and enable rolling updates for the nodejs service' (#9) from app-healthcheck into main
Reviewed-on: coop-cloud/peertube#9
This commit is contained in:
commit
99011f0df7
@ -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
|
||||
@ -77,6 +83,9 @@ services:
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
labels: ['coop-cloud.${STACK_NAME}.db.version=10-alpine-131220fe']
|
||||
cache:
|
||||
image: redis:4-alpine
|
||||
|
Loading…
Reference in New Issue
Block a user