There is great documentation about running Percona Postgres in Docker
Run Percona Distribution for PostgreSQL in a Docker container - v15
Run Percona Distribution for PostgreSQL in a Docker container - v17
And there is great documentation about running Percona Postgres HA on Debian
Deploying PostgreSQL for high availability with Patroni on Debian - v15
Deploying PostgreSQL for high availability with Patroni on Debian - v17
What I could not find is a doc for Percona Postgres HA in Docker on 3 nodes.
Does the Docker percona-distribution-postgresql image even contain a Patroni installation? Or is there another image available? There seems to be an old Percona postgres-ha Dockerfile on Github with HA in the name. Percona postgres Dockerfile also seems to include Patroni. But running patronictl does not work. rpm -qa | grep -i patroni shows nothing. Or should Patroni be better run in a separate image? But which one, there seems to be no official one?
What I am looking for is a doc or tutorial how to setup Percona Postgres HA in Docker on 3 nodes. I would love to get a simple Docker compose file, to be run on each node. It could consist of etcd and Percona Postgres, no haproxy needed. Best case it would only need an env file like this to run:
HOST=db-1.internal # unique per node
HOST_IP=100.64.0.1 # unique per node
HOST_1=db-1.internal
HOST_2=db-2.internal
HOST_3=db-3.internal
POSTGRES_PASSWORD=super-secret-1
REPLICATION_PASSWORD=super-secret-2
Is this possible? Does such a doc or tutorial exist?