-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
88 lines (79 loc) · 1.97 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
version: '3.7'
x-common: &common
depends_on:
- consul
volumes:
- ./examples/storage.lua:/opt/tarantool/storage.lua:ro
- ./examples/router.lua:/opt/tarantool/router.lua:ro
- ./autovshard:/usr/share/tarantool/autovshard:ro
- ./tests:/opt/tarantool/tests:ro
- ./scripts:/opt/tarantool/scripts:ro
- ./.luacov:/opt/tarantool/.luacov:ro
- ./output:/opt/tarantool/output
build: .
image: tnt-autovshard
entrypoint: ''
working_dir: /opt/tarantool
command:
- tarantool
- storage.lua
services:
a1:
<<: *common
ports:
- 3301:3301
hostname: a1
environment:
CONSUL_HTTP_ADDR: "http://consul:8500"
TARANTOOL_INSTANCE_UUID: aaaaaaaa-aaaa-aaaa-aaaa-000000000001
TARANTOOL_REPLICASET_UUID: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
a2:
<<: *common
ports:
- 3302:3301
hostname: a2
environment:
CONSUL_HTTP_ADDR: "http://consul:8500"
TARANTOOL_INSTANCE_UUID: aaaaaaaa-aaaa-aaaa-aaaa-000000000002
TARANTOOL_REPLICASET_UUID: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
b1:
<<: *common
ports:
- 3303:3301
hostname: b1
environment:
CONSUL_HTTP_ADDR: "http://consul:8500"
TARANTOOL_INSTANCE_UUID: bbbbbbbb-bbbb-bbbb-bbbb-000000000001
TARANTOOL_REPLICASET_UUID: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb
b2:
<<: *common
ports:
- 3304:3301
hostname: b2
environment:
CONSUL_HTTP_ADDR: "http://consul:8500"
TARANTOOL_INSTANCE_UUID: bbbbbbbb-bbbb-bbbb-bbbb-000000000002
TARANTOOL_REPLICASET_UUID: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb
router:
<<: *common
hostname: router
ports:
- 3300:3301
command:
- tarantool
- router.lua
consul:
image: consul:1.5.2
volumes:
- "./examples/consul_kv.sh:/consul_kv.sh:ro"
ports:
- 8500:8500
command:
- sh
- -c
- |
(
sleep 2
sh /consul_kv.sh
)&
consul agent -dev -client 0.0.0.0