# ============================================================ # patroni.yml – Base Patroni configuration # Node-specific values overridden via PATRONI_* env vars # ============================================================ scope: netbox-ha namespace: /service name: postgresql0 # ── REST API ────────────────────────────────────────────────── # Used for health checks, leader race, and HAProxy routing restapi: listen: 0.0.0.0:8008 connect_address: localhost:8008 # ── DCS: etcd v3 ────────────────────────────────────────────── etcd3: hosts: localhost:2379 # ── Bootstrap (only runs on first cluster init) ─────────────── # WARNING: changes here are ignored after the cluster is initialized. # Use `patronictl edit-config` to change dynamic config instead. bootstrap: dcs: ttl: 30 loop_wait: 10 retry_timeout: 10 maximum_lag_on_failover: 1048576 primary_start_timeout: 300 postgresql: use_pg_rewind: true use_slots: true parameters: wal_level: replica hot_standby: "on" max_wal_senders: 10 max_replication_slots: 10 wal_log_hints: "on" pg_hba: - host replication replicator 127.0.0.1/32 md5 - host replication replicator 0.0.0.0/0 md5 - host all all 0.0.0.0/0 md5 initdb: - encoding: UTF8 - locale: UTF8 - data-checksums # ── PostgreSQL ──────────────────────────────────────────────── postgresql: listen: 0.0.0.0:5432 connect_address: localhost:5432 data_dir: /var/lib/postgresql/data bin_dir: /usr/local/bin pgpass: /tmp/pgpass authentication: superuser: username: netbox password: netbox replication: username: replicator password: replicator-pass rewind: username: rewind_user password: rewind-pass parameters: unix_socket_directories: /var/run/postgresql # ── Tags ────────────────────────────────────────────────────── tags: nofailover: false noloadbalance: false clonefrom: false nostream: false