From 53b7cf592cd2672e62bcfc23c590cd021d3a8f12 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Mon, 4 Mar 2024 13:22:18 -0300 Subject: [PATCH] Add healthcheck, start-first --- compose.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/compose.yml b/compose.yml index e41ee0d..0948d18 100644 --- a/compose.yml +++ b/compose.yml @@ -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: