forked from heroku/logplex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
124 lines (124 loc) · 2.67 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
version: '2'
services:
data:
image: redis:2.6
command: /bin/true
db:
image: redis:2.6
command: redis-server
volumes_from:
- data
networks:
vpcbr:
ipv4_address: 10.5.0.2
base:
command: /bin/true
build: .
volumes:
- ./:/usr/src/app
- /usr/src/app/_build
logplex1:
image: logplex_base
command: ./_build/default/rel/logplex/bin/logplex foreground
# hostname: 172.17.0.3
hostname: 10.5.0.4
# domainname: docker.local
# domainname: 172.17.0.3
environment:
- INSTANCE_NAME=logplex1
- LOCAL_IP=127.0.0.1
env_file:
- logplex.env
volumes_from:
- base
# ports:
# - "8001:8001"
# - "8002:8002"
# - "8601:8601"
# - "6001:6001"
links:
- db
networks:
vpcbr:
ipv4_address: 10.5.0.4
logplex2:
image: logplex_base
command: ./_build/default/rel/logplex/bin/logplex foreground
# hostname: 172.17.0.4
hostname: 10.5.0.5
# domainname: 172.17.0.4
# domainname: docker.local
environment:
- INSTANCE_NAME=logplex2
- LOCAL_IP=127.0.0.1
env_file:
- logplex.env
volumes_from:
- base
# ports:
# - "8001:8001"
# - "8002:8002"
# - "8601:8601"
# - "6001:6001"
links:
- db
networks:
vpcbr:
ipv4_address: 10.5.0.5
compile:
command: env REBAR=rebar3 make compile
image: logplex_base
volumes_from:
- base
clean:
command: env REBAR=rebar3 make clean
image: logplex_base
volumes_from:
- base
test:
image: logplex_base
command: make test
hostname: logplex
domainname: docker.local
extra_hosts:
- "server:127.0.0.1"
- "evilserver:127.0.0.1"
environment:
- INSTANCE_NAME=logplex.docker.local
- LOCAL_IP=127.0.0.1
volumes:
- ./test:/usr/src/app/test
- ./logs:/usr/src/app/logs
- ./logplex.spec:/usr/src/app/logplex.spec
volumes_from:
- base
links:
- db
# for quicker test development, allow a shell. note that you'll need
# to run `epmd &` manually before you run tests.
test_bash:
image: logplex_base
command: bash
hostname: logplex
domainname: docker.local
extra_hosts:
- "server:127.0.0.1"
- "evilserver:127.0.0.1"
environment:
- INSTANCE_NAME=logplex.docker.local
- LOCAL_IP=127.0.0.1
volumes:
- ./test:/usr/src/app/test
- ./logs:/usr/src/app/logs
- ./logplex.spec:/usr/src/app/logplex.spec
volumes_from:
- base
links:
- db
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1