leeyspaul / docker-postgres-replication

Postgres 9.6 & 9.5 Dockerized w/ Replication. Master/Slave setup in 30 seconds.

Home Page:https://hub.docker.com/r/danieldent/postgres-replication/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postgres 9.6 Dockerized w/ Replication

Master/Slave Postgres Replication in 30 seconds.

  • Quickstart: docker-compose up
  • For production, use docker-compose, Kubernetes, Rancher, Tutum, other PaaS tooling, ... or roll your own.
  • To see container environment variable requirements, see docker-compose.yml.
  • To demonstrate multiple slaves:
    • docker-compose up
    • docker-compose scale pg-slave=3

Notes

  • No additional replication user is setup - the postgres admin user is used. This means the superuser credentials must be identical on the master and all slaves.
  • setup-replication.sh is only executed when a container's data volume is first initialized.
  • REPLICATE_FROM environment variable is only used during container initialization - if the master changes after the database has been initialized, you'll need to manually adjust the recovery.conf file in the slave containers' data volume.
  • Configuration:

About

Postgres 9.6 & 9.5 Dockerized w/ Replication. Master/Slave setup in 30 seconds.

https://hub.docker.com/r/danieldent/postgres-replication/


Languages

Language:Shell 100.0%