Skip to content

Commit

Permalink
fix glitchtip healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
peaklabs-dev committed Oct 9, 2024
1 parent f10dea2 commit a61ced8
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions templates/compose/glitchtip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,28 @@ 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:
test: ["CMD", "redis-cli", "ping"]
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}
Expand All @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit a61ced8

Please sign in to comment.