This repository has been archived by the owner on Apr 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
93 lines (85 loc) · 2.1 KB
/
docker-compose.yaml
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
version: '2'
services:
dc1consul:
image: consul:0.7.5
command: "agent -server -client 0.0.0.0 -ui -bind 0.0.0.0 -datacenter dc1 -join-wan 172.25.2.101 -bootstrap"
hostname: dc1consul
networks:
datacenter:
ipv4_address: 172.25.0.101
ports:
- 8500:8500
- 8600:8600/tcp
- 8600:8600/udp
restart: unless-stopped
dc2consul:
image: consul:0.7.5
command: "agent -server -client 0.0.0.0 -ui -bind 0.0.0.0 -datacenter dc2 -join-wan 172.25.0.101 -bootstrap"
hostname: dc2consul
networks:
datacenter:
ipv4_address: 172.25.2.101
ports:
- 18500:8500
- 18600:8600/tcp
- 18600:8600/udp
restart: unless-stopped
dc1db1:
image: postgres:9-alpine
hostname: dc1db1
networks:
- datacenter
restart: unless-stopped
dc1agent1:
build:
context: agent
image: pg-consulagent:latest
command: "agent -client 0.0.0.0 -bind 0.0.0.0 -join 172.25.0.101 -datacenter dc1 -log-level debug"
links:
- dc1db1:db
hostname: dc1agent1
networks:
datacenter:
ipv4_address: 172.25.0.151
restart: unless-stopped
dc1db2:
image: postgres:9-alpine
hostname: dc1db2
networks:
- datacenter
restart: unless-stopped
dc1agent2:
build:
context: agent
image: pg-consulagent:latest
command: "agent -client 0.0.0.0 -bind 0.0.0.0 -join 172.25.0.101 -datacenter dc1 -log-level debug"
links:
- dc1db2:db
hostname: dc1agent2
networks:
datacenter:
ipv4_address: 172.25.0.152
restart: unless-stopped
dc2db1:
image: postgres:9-alpine
hostname: dc2db1
networks:
- datacenter
restart: unless-stopped
dc2agent1:
build:
context: agent
image: pg-consulagent:latest
command: "agent -client 0.0.0.0 -bind 0.0.0.0 -join 172.25.2.101 -datacenter dc2 -log-level debug"
links:
- dc2db1:db
hostname: dc2agent1
networks:
datacenter:
ipv4_address: 172.25.2.201
restart: unless-stopped
networks:
datacenter:
ipam:
config:
- subnet: 172.25.0.0/16