-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
104 lines (102 loc) · 2.34 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
services:
link-1:
build: .
volumes:
- ./:/go/src/github.com/Scalingo/link
- ./_dev/go-cache:/root/.cache
cap_add:
- NET_ADMIN
network_mode: 'host'
env_file:
- .env
environment:
HOSTNAME: link-1
INTERFACE: eth10
PORT: 1313
command: reflex -r '\.go$$' -R '_test\.go$$' -s -- sh -c 'go build -buildvcs=false && ./link'
depends_on:
- etcd
link-2:
build: .
volumes:
- ./:/go/src/github.com/Scalingo/link
- ./_dev/go-cache:/root/.cache
cap_add:
- NET_ADMIN
network_mode: 'host'
env_file:
- .env
environment:
HOSTNAME: link-2
INTERFACE: eth11
PORT: 1314
command: reflex --all -r 'link' -s -- sh -c './link'
depends_on:
- etcd
link-3:
build: .
volumes:
- ./:/go/src/github.com/Scalingo/link
- ./_dev/go-cache:/root/.cache
cap_add:
- NET_ADMIN
network_mode: 'host'
env_file:
- .env
environment:
HOSTNAME: link-3
INTERFACE: eth12
PORT: 1315
command: reflex --all -r 'link' -s -- sh -c './link'
depends_on:
- etcd
link-4:
build: .
volumes:
- ./:/go/src/github.com/Scalingo/link
- ./_dev/go-cache:/root/.cache
cap_add:
- NET_ADMIN
network_mode: 'host'
env_file:
- .env
environment:
HOSTNAME: link-4
INTERFACE: eth13
PORT: 1316
command: reflex --all -r 'link' -s -- sh -c './link'
depends_on:
- etcd
link-5:
build: .
volumes:
- ./:/go/src/github.com/Scalingo/link
- ./_dev/go-cache:/root/.cache
cap_add:
- NET_ADMIN
network_mode: 'host'
env_file:
- .env
environment:
HOSTNAME: link-5
INTERFACE: eth14
PORT: 1317
command: reflex --all -r 'link' -s -- sh -c './link'
depends_on:
- etcd
test:
build: .
volumes:
- ./:/go/src/github.com/Scalingo/link
- ./_dev/go-cache:/root/.cache
environment:
GO_ENV: test
stop_signal: SIGKILL
command: "tail -F /dev/null"
etcd:
volumes:
- ./_dev/etcd:/data/etcd
image: quay.io/coreos/etcd:v3.5.15
command: etcd --name etcd-cluster --data-dir /data/etcd --listen-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --advertise-client-urls http://172.17.0.1:32379
ports:
- 32379:2379