etcd (Patroni Docker image)


haproxy (Patroni Docker image)

Adminer latest


Patroni is a template for PostgreSQL High Availability. Patroni stack is designed for one-click deploy on cloud with The whole deployment takes about 5-10 minutes.

How the Patroni stack works

You can read more about how Patroni works in detail in the Zalando blog post.

The Scalable HA PostgreSQL with Patroni

How to deploy the stack
  1. Click Deploy stack
  2. Sign in or create an account
  3. Choose a provider (how to add a cloud provider) and a region or an existing host (how to add own host to D2C) in Select existing hosts menu
  4. Fill in necessary fields (if they are, e.g. link to your repository)
  5. Click Create hosts and services
Minimal recommended configuration
  • 3 host with 1GB RAM
How to scale Patroni

Patroni deploys in separate services because of using different environment variables. If you need to scale your cluster, you should:

– Clone etcd service and change  ETCD_INITIAL_ADVERTISE_PEER_URLS variable to a name of a new etcd service. 

Example: newservice-1:2380

– add a new etcd to  ETCD_INITIAL_ADVERTISE_PEER_URLS variable. 

Example: etcd1-1=http://etcd1-1:2380,etcd2-1=http://etcd2-1:2380,etcd3-1=http://etcd3-1:2380, newservice-1=http://newservice-1:2380

– change ETCD_NAME variable to a name of a new etcd service 

Example: newservice-1

– clone any Patroni service and change PATRONI_NAME variable to a name of a new service

– add a new etcd to PATRONI_ETCD_HOSTS and ETCDCTL_ENDPOINTSvariables. 

Examples:  etcd1-1:2379,etcd2-1:2379,etcd3-1:2379, newservice-1:2379 and http://etcd1-1:2379,http://etcd2-1:2379,http://etcd3-1:2379,http://newservice-1:2379


How to create backups

In this image, we additionally installed pgBackRest. You can find more information about using this tool at the official user-guide.

Checking logs of containers

You can check live logs at the page of a container. Please, follow the instructions from the Help Center. You may also find information about D2C logs in the documentation.

After deploying

You can: