From a61ced89f0a45ce68788306d4cc84c418e3be5f1 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:50:23 +0200 Subject: [PATCH] fix glitchtip healthchecks --- templates/compose/glitchtip.yaml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/templates/compose/glitchtip.yaml b/templates/compose/glitchtip.yaml index 0acbf6dfbd..2f0b0100c3 100644 --- a/templates/compose/glitchtip.yaml +++ b/templates/compose/glitchtip.yaml @@ -12,12 +12,13 @@ services: - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL} - POSTGRES_DB=${POSTGRESQL_DATABASE:-glitchtip} volumes: - - pg-data:/var/lib/postgresql/data + - glitchtip-postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] interval: 5s timeout: 20s retries: 10 + redis: image: redis healthcheck: @@ -25,11 +26,14 @@ services: interval: 5s timeout: 20s retries: 10 + web: image: glitchtip/glitchtip depends_on: - - postgres - - redis + postgres: + condition: service_healthy + redis: + condition: service_healthy environment: - SERVICE_FQDN_GLITCHTIP_8080 - DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip} @@ -46,12 +50,15 @@ services: interval: 5s timeout: 20s retries: 10 + worker: image: glitchtip/glitchtip command: ./bin/run-celery-with-beat.sh depends_on: - - postgres - - redis + postgres: + condition: service_healthy + redis: + condition: service_healthy environment: - DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip} - SECRET_KEY=$SERVICE_BASE64_64_ENCRYPTION @@ -67,12 +74,15 @@ services: interval: 5s timeout: 20s retries: 10 + migrate: image: glitchtip/glitchtip restart: "no" depends_on: - - postgres - - redis + postgres: + condition: service_healthy + redis: + condition: service_healthy command: "./manage.py migrate" environment: - DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip}