-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (56 loc) · 1.53 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
version: "3"
services:
node1:
# 自己编译的镜像,在官方镜像基础上加入了官方的延迟队列插件
image: fayfox/rabbitmq-delayed-message-exchange:1.0.0
volumes:
# 时区文件
- ./etc/localtime:/etc/localtime:ro
environment:
# cookie一致的实例才能组成集群
RABBITMQ_ERLANG_COOKIE: ZDDGQMQZNGOKOETCOXKA
ports:
# 把端口都暴露出来,方便测试
- 15672:15672
- 5672:5672
hostname: node1
node2:
image: fayfox/rabbitmq-delayed-message-exchange:1.0.0
volumes:
- ./etc/localtime:/etc/localtime:ro
environment:
RABBITMQ_ERLANG_COOKIE: ZDDGQMQZNGOKOETCOXKA
ports:
- 15673:15672
- 5673:5672
hostname: node2
node3:
image: fayfox/rabbitmq-delayed-message-exchange:1.0.0
volumes:
- ./etc/localtime:/etc/localtime:ro
environment:
RABBITMQ_ERLANG_COOKIE: ZDDGQMQZNGOKOETCOXKA
ports:
- 15674:15672
- 5674:5672
hostname: node3
# Haproxy负载均衡
haproxy:
image: haproxy
volumes:
- ./conf/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
- ./etc/localtime:/etc/localtime:ro
ports:
- 1080:1080
- 1081:1081
- 8100:8100
# Nginx的负载均衡
nginx:
image: nginx
volumes:
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./conf/nginx/conf.d:/etc/nginx/conf.d:ro
- ./etc/localtime:/etc/localtime:ro
ports:
- 2080:80
- 2081:81