Skip to content

Instantly share code, notes, and snippets.

@mbornoz
Created May 27, 2016 07:11
Show Gist options
  • Save mbornoz/81a8daf22591bdda5aebe04d926ac9b6 to your computer and use it in GitHub Desktop.
Save mbornoz/81a8daf22591bdda5aebe04d926ac9b6 to your computer and use it in GitHub Desktop.
version: "2"
services:
lb:
container_name: lb
image: haproxy:1.6
ports:
- 8090:8080
- 5432:5432
- 5433:5433
links:
- pg1
- pg2
- pg3
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
pg1:
container_name: pg1
image: postgresql:9.5
pgcheck1:
image: camptocamp/pgcheck
container_name: pgcheck1
network_mode: "service:pg1"
restart: always
pg2:
container_name: pg2
image: postgresql:9.5
environment:
- PG_REPLICA=true
restart: always
pgcheck2:
image: camptocamp/pgcheck
container_name: pgcheck2
network_mode: "service:pg2"
restart: always
pg3:
container_name: pg3
image: postgresql:9.5
environment:
- PG_REPLICA=true
restart: always
pgcheck3:
image: camptocamp/pgcheck
container_name: pgcheck3
network_mode: "service:pg3"
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment