Skip to content

Instantly share code, notes, and snippets.

@jberkus
Created October 2, 2015 19:40
Show Gist options
  • Save jberkus/c5f8dc0ac70152ee0208 to your computer and use it in GitHub Desktop.
Save jberkus/c5f8dc0ac70152ee0208 to your computer and use it in GitHub Desktop.
# docker compose file for running a 3-node PostgreSQL cluster
# with etcd as the SIS
etcd:
image: quay.io/coreos/etcd
ports:
- "2379"
- "2380"
- "4001"
dbnode1:
image: jberkus/patroni-node
hostname: dbnode1
ports:
- "5432"
- "8001"
links:
- etcd
volumes:
- etc/wal-e.d:/etc/wal-e.d
env_file:
- patroni-secrets.env
environment:
NODE: dbnode1
CLUSTER: testcluster
dbnode2:
image: jberkus/patroni-node
hostname: dbnode2
ports:
- "5432"
- "8001"
links:
- etcd
volumes:
- etc/wal-e.d:/etc/wal-e.d
env_file:
- patroni-secrets.env
environment:
NODE: dbnode2
CLUSTER: testcluster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment