Skip to content

Commit

Permalink
fix: make docker installation more resilient to initial failures (#2137)
Browse files Browse the repository at this point in the history
* fix: make docker installation more resilient to initial failures

* fix: fixed syntax error

* fix: fixed compose file formatting
  • Loading branch information
subomi authored Sep 3, 2024
1 parent e72c0f2 commit e89903f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions configs/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ services:
- postgres
- redis_server
- pgbouncer

worker:
image: getconvoy/convoy:latest
command: ["./cmd", "worker", "--config", "convoy.json"]
Expand All @@ -29,7 +28,6 @@ services:
depends_on:
web:
condition: service_healthy

ingest:
image: getconvoy/convoy:latest
command: ["./cmd", "ingest", "--config", "convoy.json"]
Expand All @@ -39,24 +37,23 @@ services:
depends_on:
web:
condition: service_healthy

pgbouncer:
image: bitnami/pgbouncer:latest
hostname: pgbouncer
restart: unless-stopped
depends_on:
- postgres
postgres:
condition: service_healthy
env_file:
- ./conf/.env
volumes:
- ./conf/:/bitnami/pgbouncer/conf/
- ./conf/userlists.txt:/bitnami/userlists.txt
ports:
- "6432:6432"

postgres:
image: bitnami/postgresql:latest
restart: unless-stopped
restart: on-failure
ports:
- "5432:5432"
environment:
Expand All @@ -68,13 +65,17 @@ services:
POSTGRESQL_SHARED_PRELOAD_LIBRARIES: pg_stat_statements
volumes:
- postgresql_master_data:/bitnami/postgresql

healthcheck:
test: ["CMD-SHELL", "pg_isready -U convoy"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis_server:
image: redis:alpine
restart: unless-stopped
volumes:
- redis_data:/data

volumes:
postgresql_master_data:
redis_data:

0 comments on commit e89903f

Please sign in to comment.