Add healthcheck, start-first

This commit is contained in:
3wc 2024-03-04 13:22:18 -03:00
parent f0e68ba1d5
commit 53b7cf592c
1 changed files with 9 additions and 8 deletions

View File

@ -9,8 +9,9 @@ services:
networks:
- proxy
deploy:
# restart_policy:
# condition: on-failure
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3001"
@ -22,12 +23,12 @@ services:
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=0.4.2+1.23.11"
# healthcheck:
# test: ["CMD-SHELL", 'curl localhost:3001']
# interval: 30s
# timeout: 10s
# retries: 5
# start_period: 2m
healthcheck:
test: 'curl -L localhost:3001'
interval: 30s
timeout: 10s
retries: 5
start_period: 2m
volumes:
data: