Skip to content

Commit

Permalink
Fixed Patroni container health check in demo lab (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: Mikhail Grigorev <grigorev_mm@magnit.ru>
  • Loading branch information
CHERTS and Mikhail Grigorev authored Sep 13, 2024
1 parent 34fc17f commit adfd746
Show file tree
Hide file tree
Showing 2 changed files with 767 additions and 75 deletions.
30 changes: 24 additions & 6 deletions deploy/demo-lab/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ services:
- etc_data1:/var/lib/etcd
hostname: etcd1
command: etcd --name etcd1 --initial-advertise-peer-urls http://etcd1:2380
healthcheck:
test: ["CMD-SHELL", "etcdctl endpoint health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
etcd2:
<<: *etcd
container_name: etcd2
Expand Down Expand Up @@ -182,11 +188,15 @@ services:
environment:
<<: *haproxy_env
PATRONI_NAME: patroni1
depends_on:
- etcd1
- etcd2
- etcd3
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
interval: 30s
timeout: 5s
retries: 5
retries: 10
start_period: 10s
patroni2:
container_name: patroni2
Expand All @@ -202,11 +212,15 @@ services:
environment:
<<: *haproxy_env
PATRONI_NAME: patroni2
depends_on:
- etcd1
- etcd2
- etcd3
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
interval: 30s
timeout: 5s
retries: 5
retries: 10
start_period: 10s
patroni3:
container_name: patroni3
Expand All @@ -222,11 +236,15 @@ services:
environment:
<<: *haproxy_env
PATRONI_NAME: patroni3
depends_on:
- etcd1
- etcd2
- etcd3
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
interval: 30s
timeout: 5s
retries: 5
retries: 10
start_period: 10s
pgbouncer12:
container_name: pgbouncer12
Expand Down
Loading

0 comments on commit adfd746

Please sign in to comment.