-
Notifications
You must be signed in to change notification settings - Fork 0
/
rabbitmq-cluster.yml
74 lines (73 loc) · 2.62 KB
/
rabbitmq-cluster.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
# https://hub.docker.com/r/bitnami/rabbitmq
services:
rabbitmq-cluster-1:
image: ${RABBITMQ_IMAGE}
container_name: rabbitmq-cluster-1
restart: on-failure
environment:
- TZ=Asia/Shanghai
- RABBITMQ_USERNAME
- RABBITMQ_PASSWORD
- RABBITMQ_PLUGINS
- RABBITMQ_COMMUNITY_PLUGINS
- RABBITMQ_ERL_COOKIE=RABBITMQ_CLUSTER_ERL_COOKIE
- RABBITMQ_NODE_TYPE=${RABBITMQ_CLUSTER_NODE1_NODE_TYPE}
- RABBITMQ_NODE_NAME=${RABBITMQ_CLUSTER_NODE1_NODE_NAME}
volumes:
- ${RABBITMQ_CLUSTER_HOME}/node1:/bitnami/rabbitmq
- ${RABBITMQ_CLUSTER_HOME}/node1/conf/custom.conf:/bitnami/rabbitmq/conf/custom.conf:ro
networks:
- rabbitmq_cluster
ports:
- ${RABBITMQ_CLUSTER_NODE1_PORT_5671}:5671
- ${RABBITMQ_CLUSTER_NODE1_PORT_5672}:5672
- ${RABBITMQ_CLUSTER_NODE1_PORT_15672}:15672
rabbitmq-cluster-2:
image: ${RABBITMQ_IMAGE}
container_name: rabbitmq-cluster-2
restart: on-failure
environment:
- TZ=Asia/Shanghai
- RABBITMQ_USERNAME
- RABBITMQ_PASSWORD
- RABBITMQ_PLUGINS
- RABBITMQ_COMMUNITY_PLUGINS
- RABBITMQ_ERL_COOKIE=RABBITMQ_CLUSTER_ERL_COOKIE
- RABBITMQ_NODE_TYPE=${RABBITMQ_CLUSTER_NODE2_NODE_TYPE}
- RABBITMQ_NODE_NAME=${RABBITMQ_CLUSTER_NODE2_NODE_NAME}
- RABBITMQ_CLUSTER_NODE_NAME=${RABBITMQ_CLUSTER_NODE1_NODE_NAME}
volumes:
- ${RABBITMQ_CLUSTER_HOME}/node2:/bitnami/rabbitmq
- ${RABBITMQ_CLUSTER_HOME}/node2/conf/custom.conf:/bitnami/rabbitmq/conf/custom.conf:ro
networks:
- rabbitmq_cluster
ports:
- ${RABBITMQ_CLUSTER_NODE2_PORT_5671}:5671
- ${RABBITMQ_CLUSTER_NODE2_PORT_5672}:5672
- ${RABBITMQ_CLUSTER_NODE2_PORT_15672}:15672
rabbitmq-cluster-3:
image: ${RABBITMQ_IMAGE}
container_name: rabbitmq-cluster-3
restart: on-failure
environment:
- TZ=Asia/Shanghai
- RABBITMQ_USERNAME
- RABBITMQ_PASSWORD
- RABBITMQ_PLUGINS
- RABBITMQ_COMMUNITY_PLUGINS
- RABBITMQ_ERL_COOKIE=RABBITMQ_CLUSTER_ERL_COOKIE
- RABBITMQ_NODE_TYPE=${RABBITMQ_CLUSTER_NODE3_NODE_TYPE}
- RABBITMQ_NODE_NAME=${RABBITMQ_CLUSTER_NODE3_NODE_NAME}
- RABBITMQ_CLUSTER_NODE_NAME=${RABBITMQ_CLUSTER_NODE1_NODE_NAME}
volumes:
- ${RABBITMQ_CLUSTER_HOME}/node3:/bitnami/rabbitmq
- ${RABBITMQ_CLUSTER_HOME}/node3/conf/custom.conf:/bitnami/rabbitmq/conf/custom.conf:ro
networks:
- rabbitmq_cluster
ports:
- ${RABBITMQ_CLUSTER_NODE3_PORT_5671}:5671
- ${RABBITMQ_CLUSTER_NODE3_PORT_5672}:5672
- ${RABBITMQ_CLUSTER_NODE3_PORT_15672}:15672
networks:
rabbitmq_cluster:
driver: bridge