forked from pardahlman/docker-rabbitmq-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (57 loc) · 1.73 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
version: "3"
services:
rabbitmq1:
image: rabbitmq:${RABBITMQ_DOCKER_TAG}
hostname: rabbitmq1
environment:
- RABBITMQ_ERLANG_COOKIE=${RABBITMQ_ERLANG_COOKIE}
volumes:
- ./config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- ./config/advanced.config:/etc/rabbitmq/advanced.config
- ./config/enabled_plugins:/etc/rabbitmq/enabled_plugins
ports:
- 5673:5672
- 15673:15672
rabbitmq2:
image: rabbitmq:${RABBITMQ_DOCKER_TAG}
hostname: rabbitmq2
depends_on:
- rabbitmq1
environment:
- RABBITMQ_ERLANG_COOKIE=${RABBITMQ_ERLANG_COOKIE}
volumes:
- ./cluster-entrypoint.sh:/usr/local/bin/cluster-entrypoint.sh
- ./config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- ./config/advanced.config:/etc/rabbitmq/advanced.config
- ./config/enabled_plugins:/etc/rabbitmq/enabled_plugins
entrypoint: /usr/local/bin/cluster-entrypoint.sh
ports:
- 5674:5672
- 15674:15672
rabbitmq3:
image: rabbitmq:${RABBITMQ_DOCKER_TAG}
hostname: rabbitmq3
depends_on:
- rabbitmq1
environment:
- RABBITMQ_ERLANG_COOKIE=${RABBITMQ_ERLANG_COOKIE}
volumes:
- ./cluster-entrypoint.sh:/usr/local/bin/cluster-entrypoint.sh
- ./config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- ./config/advanced.config:/etc/rabbitmq/advanced.config
- ./config/enabled_plugins:/etc/rabbitmq/enabled_plugins
entrypoint: /usr/local/bin/cluster-entrypoint.sh
ports:
- 5675:5672
- 15675:15672
haproxy:
image: haproxy:1.7
volumes:
- ./config/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
depends_on:
- rabbitmq1
- rabbitmq2
- rabbitmq3
ports:
- 15672:15672
- 5672:5672