From d793b4d433a09d4e440d3a5500451e8abd0e2ab5 Mon Sep 17 00:00:00 2001 From: brooke Date: Sun, 2 Mar 2025 00:54:03 -0500 Subject: [PATCH] add proper healthcheck --- compose.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/compose.yml b/compose.yml index ad573d0..190f498 100644 --- a/compose.yml +++ b/compose.yml @@ -24,6 +24,38 @@ services: - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - coop-cloud.${STACK_NAME}.version=0.1.1+v0.90.78 +version: "3.8" +services: + app: + image: adamboutcher/statping-ng:v0.90.78 + networks: + - proxy + volumes: + - statping:/app + environment: + VIRTUAL_HOST: localhost + VIRTUAL_PORT: 8080 + DB_CONN: sqlite + NAME: ${SITE_NAME} + DESCRIPTION: ${SITE_DESCRIPTION} + deploy: + update_config: + failure_action: rollback + order: start-first + labels: + - "traefik.enable=true" + - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" + - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080" + - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" + - coop-cloud.${STACK_NAME}.version=0.1.1+v0.90.78 + healthcheck: + test: wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1 + interval: 120s + retries: 5 + start_period: 30s + timeout: 10s + networks: proxy: external: true