-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
49 lines (46 loc) · 1.05 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
version: "3.9"
services:
haproxy:
image: haproxy:2.4
container_name: haproxy_load_balancer
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
networks:
- rabbitmq-cluster
depends_on:
- rabbitmq1
- rabbitmq2
- rabbitmq3
rabbitmq1:
image: rabbitmq:3-management
hostname: rabbitmq1
environment:
- RABBITMQ_ERLANG_COOKIE=my-secret-cookie
- RABBITMQ_NODENAME=rabbitmq1
networks:
- rabbitmq-cluster
rabbitmq2:
image: rabbitmq:3-management
hostname: rabbitmq2
environment:
- RABBITMQ_ERLANG_COOKIE=my-secret-cookie
- RABBITMQ_NODENAME=rabbitmq2
networks:
- rabbitmq-cluster
depends_on:
- rabbitmq1
rabbitmq3:
image: rabbitmq:3-management
hostname: rabbitmq3
environment:
- RABBITMQ_ERLANG_COOKIE=my-secret-cookie
- RABBITMQ_NODENAME=rabbitmq3
networks:
- rabbitmq-cluster
depends_on:
- rabbitmq1
networks:
rabbitmq-cluster: