add proper healthcheck

This commit is contained in:
brooke 2025-03-02 00:54:03 -05:00
parent 0eacf26f3c
commit d793b4d433

View File

@ -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