forked from dbist/cockroach-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
132 lines (122 loc) · 2.92 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: '3'
volumes:
certs-roach-0:
certs-roach-1:
certs-roach-2:
keytab:
certs-client:
services:
roach-cert:
container_name: roach-cert
hostname: roach-cert
build: roach-cert
volumes:
- certs-roach-0:/certs/roach-0
- certs-roach-1:/certs/roach-1
- certs-roach-2:/certs/roach-2
- certs-client:/certs/client
kdc:
container_name: kdc
hostname: kdc
build: ./kdc
volumes:
- ./kdc/start.sh:/start.sh
- keytab:/keytab
depends_on:
- roach-cert
networks:
roachnet:
ipv4_address: 172.28.1.3
roach-0:
container_name: roach-0
hostname: roach-0
image: cockroachdb/cockroach:v20.1.4
depends_on:
- kdc
- roach-cert
command: start --logtostderr=WARNING --log-file-verbosity=WARNING --certs-dir=/certs --listen-addr=roach-0:26257 --advertise-addr=roach-0:26257 --max-sql-memory=.25 --cache=.25
environment:
- KRB5_KTNAME=/keytab/crdb.keytab
volumes:
- certs-roach-0:/certs
- keytab:/keytab
networks:
roachnet:
ipv4_address: 172.28.1.4
roach-1:
container_name: roach-1
hostname: roach-1
image: cockroachdb/cockroach:v20.1.4
depends_on:
- kdc
- roach-cert
- roach-0
command: start --logtostderr=WARNING --log-file-verbosity=WARNING --certs-dir=/certs --join=roach-0 --listen-addr=roach-1:26257 --advertise-addr=roach-1:26257 --max-sql-memory=.25 --cache=.25
environment:
- KRB5_KTNAME=/keytab/crdb.keytab
volumes:
- certs-roach-1:/certs
- keytab:/keytab
networks:
roachnet:
ipv4_address: 172.28.1.5
roach-2:
container_name: roach-2
hostname: roach-2
image: cockroachdb/cockroach:v20.1.4
depends_on:
- kdc
- roach-cert
- roach-0
command: start --logtostderr=WARNING --log-file-verbosity=WARNING --certs-dir=/certs --join=roach-0 --listen-addr=roach-2:26257 --advertise-addr=roach-2:26257 --max-sql-memory=.25 --cache=.25
environment:
- KRB5_KTNAME=/keytab/crdb.keytab
volumes:
- certs-roach-2:/certs
- keytab:/keytab
networks:
roachnet:
ipv4_address: 172.28.1.6
lb:
container_name: lb
hostname: lb
build: haproxy
ports:
- "26257:26257"
- "8080:8080"
- "8081:8081"
depends_on:
- roach-0
- roach-1
- roach-2
networks:
roachnet:
ipv4_address: 172.28.1.7
app:
container_name: app
hostname: app
build: spring/.
extra_hosts:
- "lb:172.28.1.7"
depends_on:
- roach-cert
- lb
- kdc
- roach-0
- roach-1
- roach-2
volumes:
- ./kdc/krb5.conf:/etc/krb5.conf
- certs-client:/certs
- keytab:/keytab
ports:
- "8000:8000"
networks:
roachnet:
ipv4_address: 172.28.1.8
networks:
roachnet:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16