Files
sven e7b53b6965 modified: .env
modified:   README.md
modified:   compose.yml
modified:   configuration.py
new file:   haproxy.cfg
new file:   init-patroni-users.sql
renamed:    entrypoint.sh -> netbox-entrypoint.sh
renamed:    Containerfile -> netbox.Containerfile
modified:   nginx.conf
new file:   patroni-entrypoint.sh
new file:   patroni.Containerfile
new file:   patroni.yml
2026-08-03 15:04:38 +02:00

74 lines
2.4 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# 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