Implementation of the Autopilot Pattern for Postgres
1.2K
This repo serves as a blueprint demonstrating Postgres designed for automated operation using the Autopilot Pattern.
CONSUL: consul hostnameCONSUL_AGENT: determines if the consul agent is executed in the containerDEBUG: used to control the Node.js debug moduleLOG_LEVEL: control the amount of logging from ContainerPilotPGDATA: sets the location of the Postgres database filesPOSTGRES_DB: the name of the Postgres databasePOSTGRES_PASSWORD: the password used to access the Postgres databasePOSTGRES_USER: the username used to access the Postgres database$ cd examples/compose
$ docker-compose up -d
$ docker-compose scale db=3
The first instance creates a Postgres master. All additional instances create read-only replicas.
This image extends the official postgres:9.6.4-alpine image. Postgres can be configured as needed by modifying etc/pg_hba.conf, etc/postgresql.conf.ctmpl, and etc/recovery.conf.ctmpl, and then rebuilding the image.
Content type
Image
Digest
Size
47.2 MB
Last updated
about 9 years ago
docker pull autopilotpattern/postgres