Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions aggregation_mode/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Shared base configuration for Postgres nodes. Avoids duplication and keeps all nodes consistent.
# Note: This is a template, not a service.
x-node: &node
image: citusdata/pg_auto_failover:v2.0-pg14
volumes:
- /var/lib/postgres
environment:
PGDATA: /var/lib/postgres/pgaf
PGUSER: tutorial
PGDATABASE: tutorial
PG_AUTOCTL_HBA_LAN: true
PG_AUTOCTL_AUTH_METHOD: "trust"
PG_AUTOCTL_SSL_SELF_SIGNED: true
PG_AUTOCTL_MONITOR: "postgresql://autoctl_node@monitor/pg_auto_failover"
expose:
- 5432
networks:
- aligned-network

volumes:
postgres_data:

Expand Down Expand Up @@ -31,3 +50,41 @@ services:
- 8090:8080
networks:
- aligned-network

monitor:
image: citusdata/pg_auto_failover:v2.0-pg14
volumes:
- /var/lib/postgres
environment:
PGDATA: /var/lib/postgres/pgaf
PG_AUTOCTL_SSL_SELF_SIGNED: true
ports:
- "5436:5432"
command: |
pg_autoctl create monitor --auth trust --run
networks:
- aligned-network

node1:
<<: *node
hostname: node1
command: >
pg_autoctl create postgres
--name node1
--ssl-self-signed
--ssl-mode require
--auth trust
--pg-hba-lan
--run

node2:
<<: *node
hostname: node2
command: >
pg_autoctl create postgres
--name node2
--ssl-self-signed
--ssl-mode require
--auth trust
--pg-hba-lan
--run
4 changes: 2 additions & 2 deletions metrics-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ services:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PROMETHEUS_URL=http://prometheus:9090
- MONITOR_DB_HOST=host.docker.internal
- MONITOR_DB_PORT=5436
- MONITOR_DB_HOST=monitor
- MONITOR_DB_PORT=5432
- MONITOR_DB_DB=pg_auto_failover
- MONITOR_DB_USER=autoctl_node
extra_hosts:
Expand Down