1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
version: "3.9" # optional since v1.27.0
services:
monitor:
image: pg_auto_failover:citus
environment:
PGDATA: /tmp/pgaf
command: |
pg_autoctl create monitor --ssl-self-signed --auth trust --run
expose:
- 5432
coord:
image: pg_auto_failover:citus
environment:
PGDATA: /tmp/pgaf
PGUSER: citus
PGDATABASE: citus
PG_AUTOCTL_MONITOR: "postgresql://autoctl_node@monitor/pg_auto_failover"
expose:
- 5432
command: |
pg_autoctl create coordinator --ssl-self-signed --auth trust --pg-hba-lan --run
worker:
image: pg_auto_failover:citus
environment:
PGDATA: /tmp/pgaf
PGUSER: citus
PGDATABASE: citus
PG_AUTOCTL_MONITOR: "postgresql://autoctl_node@monitor/pg_auto_failover"
expose:
- 5432
command: |
pg_autoctl create worker --ssl-self-signed --auth trust --pg-hba-lan --run
|