-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml
54 lines (54 loc) · 1.33 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
version: "3.6"
services:
rabbitmq-01:
image: olgac/rabbitmq:3.7.8-management
hostname: rabbitmq-01
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=Passw0rd
- RABBITMQ_ERLANG_COOKIE="MY-SECRET-KEY-123"
networks:
- prod
volumes:
- rabbitmq-01-data:/var/lib/rabbitmq
deploy:
mode: global
placement:
constraints: [node.labels.rabbitmq1 == true]
rabbitmq-02:
image: olgac/rabbitmq:3.7.8-management
hostname: rabbitmq-02
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=Passw0rd
- RABBITMQ_ERLANG_COOKIE="MY-SECRET-KEY-123"
networks:
- prod
volumes:
- rabbitmq-02-data:/var/lib/rabbitmq
deploy:
mode: global
placement:
constraints: [node.labels.rabbitmq2 == true]
rabbitmq-03:
image: olgac/rabbitmq:3.7.8-management
hostname: rabbitmq-03
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=Passw0rd
- RABBITMQ_ERLANG_COOKIE="MY-SECRET-KEY-123"
networks:
- prod
volumes:
- rabbitmq-03-data:/var/lib/rabbitmq
deploy:
mode: global
placement:
constraints: [node.labels.rabbitmq3 == true]
networks:
prod:
external: true
volumes:
rabbitmq-01-data:
rabbitmq-02-data:
rabbitmq-03-data: