forked from compose/governor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
58 lines (53 loc) · 1.3 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
etcd:
image: quay.io/coreos/etcd
restart: always
command: >
-advertise-client-urls="http://0.0.0.0:2379,http://0.0.0.0:4001"
-listen-client-urls="http://0.0.0.0:2379,http://0.0.0.0:4001"
psql0:
image: os/govenror:latest
restart: always
environment:
GOVERNOR_ETCD_HOST: etcd:2379
GOVERNOR_POSTGRESQL_NAME: postgresql1
GOVERNOR_POSTGRESQL_DATA_DIR: /data/postgres
GOVERNOR_POSTGRESQL_READ_ONLY_PORT: 5433
links:
- etcd
volumes:
- "./pg_hba.conf:/governor/pg_hba.conf"
psql1:
image: os/govenror:latest
restart: always
environment:
GOVERNOR_ETCD_HOST: etcd:2379
GOVERNOR_POSTGRESQL_NAME: postgresql2
GOVERNOR_POSTGRESQL_DATA_DIR: /data/postgres
GOVERNOR_POSTGRESQL_READ_ONLY_PORT: 5433
links:
- etcd
volumes:
- "./pg_hba.conf:/governor/pg_hba.conf"
psql2:
image: os/govenror:latest
restart: always
environment:
GOVERNOR_ETCD_HOST: etcd:2379
GOVERNOR_POSTGRESQL_NAME: postgresql3
GOVERNOR_POSTGRESQL_DATA_DIR: /data/postgres
GOVERNOR_POSTGRESQL_READ_ONLY_PORT: 5433
links:
- etcd
volumes:
- "./pg_hba.conf:/governor/pg_hba.conf"
haproxy:
image: haproxy:latest
volumes:
- "./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg"
ports:
- "5432:5432"
- "5433:5433"
links:
- psql0
- psql1
- psql2