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
This commit is contained in:
sven committed 2026-08-03 15:04:38 +02:00
1 parent 136ee48052
commit e7b53b6965
12 files changed
+404 -41

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
-- ============================================================
-- init-patroni-users.sql
-- Creates users required by Patroni on an existing standalone
-- PostgreSQL instance before Patroni takeover.
--
-- Run this on the current primary BEFORE starting Patroni:
-- podman compose run --rm --no-deps postgres \
-- psql -U netbox -d netbox -f /init-patroni-users.sql
-- ============================================================
-- Replication user (used by replicas for streaming replication)
CREATE ROLE replicator WITH REPLICATION LOGIN PASSWORD 'replicator-pass';
-- Rewind user (used by pg_rewind when a former leader rejoins)
CREATE ROLE rewind_user WITH LOGIN PASSWORD 'rewind-pass';
GRANT EXECUTE ON function pg_catalog.pg_ls_dir(text, boolean, boolean) TO rewind_user;
GRANT EXECUTE ON function pg_catalog.pg_stat_file(text, boolean) TO rewind_user;
GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text) TO rewind_user;
GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text, bigint, bigint, boolean) TO rewind_user;