-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (94 loc) · 2.96 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: '2.1'
services:
sentinel:
build:
context: .
dockerfile: Dockerfile-Sentinel
image: ${IMAGE_TAG_SENTINEL}
environment:
- STSENTINEL_STORE_ENDPOINTS=http://etcd-00:2379,http://etcd-01:2379,http://etcd-02:2379
networks:
- stolon-network
depends_on:
- etcd-00
- etcd-01
- etcd-02
keeper:
build:
context: .
dockerfile: Dockerfile-Keeper
image: ${IMAGE_TAG_KEEPER}
volumes:
- ./etc/secrets/pgsql:${STOLON_KEEPER_PG_SU_PASSWORDFILE}
- ./etc/secrets/pgsql:${STOLON_KEEPER_PG_REPL_PASSWORDFILE}
environment:
- ETCD_TOKEN=${ETCD_TOKEN}
- STKEEPER_STORE_ENDPOINTS=http://etcd-00:2379,http://etcd-01:2379,http://etcd-02:2379
- STKEEPER_PG_SU_PASSWORDFILE=${STOLON_KEEPER_PG_SU_PASSWORDFILE}
- STKEEPER_PG_REPL_PASSWORDFILE=${STOLON_KEEPER_PG_REPL_PASSWORDFILE}
networks:
- stolon-network
proxy:
build:
context: .
dockerfile: Dockerfile-Proxy
image: ${IMAGE_TAG_PROXY}
environment:
- STPROXY_STORE_ENDPOINTS=http://etcd-00:2379,http://etcd-01:2379,http://etcd-02:2379
networks:
- stolon-network
ports:
- ${STOLON_PROXY_PORT}
depends_on:
- etcd-00
- etcd-01
- etcd-02
etcd-00:
image: quay.io/coreos/etcd:${ETCD_VERSION}
container_name: etcd-00
command:
- etcd
- --name=etcd-00
- --data-dir=data.etcd
- --advertise-client-urls=http://etcd-00:2379
- --listen-client-urls=http://0.0.0.0:2379
- --initial-advertise-peer-urls=http://etcd-00:2380
- --listen-peer-urls=http://0.0.0.0:2380
- --initial-cluster=etcd-00=http://etcd-00:2380,etcd-01=http://etcd-01:2380,etcd-02=http://etcd-02:2380
- --initial-cluster-state=new
- --initial-cluster-token=${ETCD_TOKEN}
networks:
- stolon-network
etcd-01:
extends:
service: etcd-00
container_name: etcd-01
command:
- etcd
- --name=etcd-01
- --data-dir=data.etcd
- --advertise-client-urls=http://etcd-01:2379
- --listen-client-urls=http://0.0.0.0:2379
- --initial-advertise-peer-urls=http://etcd-01:2380
- --listen-peer-urls=http://0.0.0.0:2380
- --initial-cluster=etcd-00=http://etcd-00:2380,etcd-01=http://etcd-01:2380,etcd-02=http://etcd-02:2380
- --initial-cluster-state=new
- --initial-cluster-token=${ETCD_TOKEN}
etcd-02:
extends:
service: etcd-00
container_name: etcd-02
command:
- etcd
- --name=etcd-02
- --data-dir=data.etcd
- --advertise-client-urls=http://etcd-02:2379
- --listen-client-urls=http://0.0.0.0:2379
- --initial-advertise-peer-urls=http://etcd-02:2380
- --listen-peer-urls=http://0.0.0.0:2380
- --initial-cluster=etcd-00=http://etcd-00:2380,etcd-01=http://etcd-01:2380,etcd-02=http://etcd-02:2380
- --initial-cluster-state=new
- --initial-cluster-token=${ETCD_TOKEN}
networks:
stolon-network:
driver: bridge