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

+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# ============================================================
# /patroni-entrypoint.sh – Patroni container entrypoint
# Ensures permissions then starts Patroni as the postgres user
# ============================================================
set -euo pipefail
DATA_DIR="${PATRONI_POSTGRESQL_DATA_DIR:-/var/lib/postgresql/data}"
# Ensure data and socket directories exist with correct ownership
mkdir -p "$DATA_DIR" /var/run/postgresql
chown -R postgres:postgres "$DATA_DIR" /var/run/postgresql
# PostgreSQL requires data dir mode 0700 or 0750
chmod 700 "$DATA_DIR"
# Ensure pgpass file is writable by postgres
touch /tmp/pgpass
chown postgres:postgres /tmp/pgpass
chmod 600 /tmp/pgpass
# Start Patroni (manages PostgreSQL lifecycle) as postgres user
exec su-exec postgres "$@"