Patroni 4.1 (etcd) HA cluster node on top of epicmorg/postgres 9.3-18
5.1K
epicmorg/postgres-patroniPatroni high-availability PostgreSQL node, one tag per
PostgreSQL major, built on top of
epicmorg/postgres:<major>
(so the same PostgreSQL build and extension set).
epicmorg/postgres:<major>;patroni[psycopg2,etcd] 4.1.* installed with pip (DCS: etcd);patroni /etc/patroni.yml as the postgres user, with
PATRONI_LOG_DIR=/var/log/patroni and PATRONI_LOG_LEVEL=DEBUG;/var/lib/postgresql owned by postgres (mode 0700) - mount the data directory there;htop, net-tools for troubleshooting.The image ships no patroni.yml: mount your own at /etc/patroni.yml (it defines the
PostgreSQL port, data directory, REST API listen address, etcd hosts, users and replication).
Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/postgres-patroni:<tag> on each) - same digest everywhere.
One node of a cluster (repeat per host with its own patroni.yml; an etcd cluster is required):
services:
patroni17:
image: epicmorg/postgres-patroni:17
container_name: patroni17
restart: always
ports:
- "6432:6432" # PostgreSQL, as set in patroni.yml
- "8008:8008" # Patroni REST API, as set in patroni.yml
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./data/17:/var/lib/postgresql
- ./config/patroni.yml:/etc/patroni.yml:ro
- ./logs/patroni:/var/log/patroni
- ./logs/postgresql:/var/log/postgresql
environment:
PATRONICTL_CONFIG_FILE: /etc/patroni.yml
depends_on:
- etcd
Users, passwords and initdb options come from patroni.yml (the POSTGRES_* variables of
epicmorg/postgres are not used here). patronictl list inside the container shows the cluster state (PATRONICTL_CONFIG_FILE points it
at the config). Configuration reference: Patroni YAML configuration.
Content type
Image
Digest
sha256:0d364c7ba…
Size
1.8 GB
Last updated
about 2 hours ago
docker pull epicmorg/postgres-patroni