fix glitchtip healthchecks

This commit is contained in:
peaklabs-dev
2024-10-09 17:50:23 +02:00
parent f10dea28a6
commit a61ced89f0

View File

@@ -12,12 +12,13 @@ services:
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL} - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
- POSTGRES_DB=${POSTGRESQL_DATABASE:-glitchtip} - POSTGRES_DB=${POSTGRESQL_DATABASE:-glitchtip}
volumes: volumes:
- pg-data:/var/lib/postgresql/data - glitchtip-postgres-data:/var/lib/postgresql/data
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s interval: 5s
timeout: 20s timeout: 20s
retries: 10 retries: 10
redis: redis:
image: redis image: redis
healthcheck: healthcheck:
@@ -25,11 +26,14 @@ services:
interval: 5s interval: 5s
timeout: 20s timeout: 20s
retries: 10 retries: 10
web: web:
image: glitchtip/glitchtip image: glitchtip/glitchtip
depends_on: depends_on:
- postgres postgres:
- redis condition: service_healthy
redis:
condition: service_healthy
environment: environment:
- SERVICE_FQDN_GLITCHTIP_8080 - SERVICE_FQDN_GLITCHTIP_8080
- DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip} - DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip}
@@ -46,12 +50,15 @@ services:
interval: 5s interval: 5s
timeout: 20s timeout: 20s
retries: 10 retries: 10
worker: worker:
image: glitchtip/glitchtip image: glitchtip/glitchtip
command: ./bin/run-celery-with-beat.sh command: ./bin/run-celery-with-beat.sh
depends_on: depends_on:
- postgres postgres:
- redis condition: service_healthy
redis:
condition: service_healthy
environment: environment:
- DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip} - DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip}
- SECRET_KEY=$SERVICE_BASE64_64_ENCRYPTION - SECRET_KEY=$SERVICE_BASE64_64_ENCRYPTION
@@ -67,12 +74,15 @@ services:
interval: 5s interval: 5s
timeout: 20s timeout: 20s
retries: 10 retries: 10
migrate: migrate:
image: glitchtip/glitchtip image: glitchtip/glitchtip
restart: "no" restart: "no"
depends_on: depends_on:
- postgres postgres:
- redis condition: service_healthy
redis:
condition: service_healthy
command: "./manage.py migrate" command: "./manage.py migrate"
environment: environment:
- DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip} - DATABASE_URL=postgres://$SERVICE_USER_POSTGRESQL:$SERVICE_PASSWORD_POSTGRESQL@postgres:5432/${POSTGRESQL_DATABASE:-glitchtip}