-
Notifications
You must be signed in to change notification settings - Fork 56
/
docker-compose.yml
74 lines (69 loc) · 1.9 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
version: '3'
services:
rabbitmq1:
image: rabbitmq:3-management
hostname: rabbitmq1
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_DEFAULT_VHOST}
volumes:
- ${PWD}/.erlang.cookie:/var/lib/rabbitmq/.erlang.cookie
- ${PWD}/cluster-entrypoint.sh:/usr/local/bin/cluster-entrypoint.sh
- rabbitmq1-data:/var/lib/rabbitmq/
- rabbitmq1-logs:/var/log/rabbitmq
entrypoint: /usr/local/bin/cluster-entrypoint.sh
networks:
- rabbitmq
rabbitmq2:
image: rabbitmq:3-management
hostname: rabbitmq2
depends_on:
- rabbitmq1
environment:
- JOIN_CLUSTER_HOST=rabbitmq1
volumes:
- ${PWD}/.erlang.cookie:/var/lib/rabbitmq/.erlang.cookie
- ${PWD}/cluster-entrypoint.sh:/usr/local/bin/cluster-entrypoint.sh
- rabbitmq2-data:/var/lib/rabbitmq/
- rabbitmq2-logs:/var/log/rabbitmq
entrypoint: /usr/local/bin/cluster-entrypoint.sh
networks:
- rabbitmq
rabbitmq3:
image: rabbitmq:3-management
hostname: rabbitmq3
depends_on:
- rabbitmq1
environment:
- JOIN_CLUSTER_HOST=rabbitmq1
volumes:
- ${PWD}/.erlang.cookie:/var/lib/rabbitmq/.erlang.cookie
- ${PWD}/cluster-entrypoint.sh:/usr/local/bin/cluster-entrypoint.sh
- rabbitmq3-data:/var/lib/rabbitmq/
- rabbitmq3-logs:/var/log/rabbitmq
entrypoint: /usr/local/bin/cluster-entrypoint.sh
networks:
- rabbitmq
haproxy:
image: haproxy:1.7
volumes:
- ${PWD}/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
depends_on:
- rabbitmq1
- rabbitmq2
- rabbitmq3
ports:
- 15672:15672
- 5672:5672
networks:
- rabbitmq
networks:
rabbitmq:
volumes:
rabbitmq1-data:
rabbitmq1-logs:
rabbitmq2-data:
rabbitmq2-logs:
rabbitmq3-data:
rabbitmq3-logs: