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:
1 parent
136ee48052
commit
e7b53b6965
12 files changed
+404
-41
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# ============================================================
|
||||
# Patroni + PostgreSQL 16 – Alpine
|
||||
# HA PostgreSQL cluster managed by Patroni
|
||||
# DCS: etcd v3
|
||||
# ============================================================
|
||||
|
||||
ARG POSTGRES_VERSION=16
|
||||
|
||||
FROM postgres:${POSTGRES_VERSION}-alpine
|
||||
|
||||
LABEL org.opencontainers.image.title="patroni-postgres" \
|
||||
org.opencontainers.image.description="PostgreSQL 16 with Patroni HA (etcd DCS)"
|
||||
|
||||
# Patroni runtime: Python 3, pip, su-exec (privilege drop), curl (healthchecks)
|
||||
RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-pip \
|
||||
su-exec \
|
||||
bash \
|
||||
curl \
|
||||
&& pip install --no-cache-dir --break-system-packages \
|
||||
"patroni[etcd3,psycopg3]"
|
||||
|
||||
# Bake in base Patroni configuration
|
||||
# Node-specific values overridden via PATRONI_* env vars at runtime
|
||||
COPY patroni.yml /etc/patroni/patroni.yml
|
||||
COPY patroni-entrypoint.sh /patroni-entrypoint.sh
|
||||
RUN chmod +x /patroni-entrypoint.sh
|
||||
|
||||
# Patroni manages postgres lifecycle; data dir is a volume
|
||||
VOLUME ["/var/lib/postgresql/data"]
|
||||
|
||||
ENTRYPOINT ["/patroni-entrypoint.sh"]
|
||||
CMD ["patroni", "/etc/patroni/patroni.yml"]
|
||||
Reference in new issue
Block a user