-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
87 lines (80 loc) · 1.99 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3.7'
networks:
todolist:
driver: bridge
services:
mysql:
container_name: mysql
image: mysql:latest
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=micro_todolist
- MYSQL_USER=micro_todolist
- MYSQL_PASSWORD=micro_todolist
- TZ=Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime
- ./config/mysql:/var/lib/mysql
- ./logs/mysql/log:/var/log/mysql
ports:
- "3306:3306"
networks:
- todolist
etcd:
image: "quay.io/coreos/etcd:v3.5.5"
container_name: etcd
restart: on-failure
privileged: true
ports:
- "2379:2379"
environment:
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
- "ALLOW_NONE_AUTHENTICATION=yes"
- ETCD_API=3
- ETCD_CERT_FILE="/path/to/server.crt"
- ETCD_KEY_FILE="/path/to/server.key"
- ETCD_AUTH="simple"
- ETCD_AUTH_USER="todolist"
- ETCD_AUTH_PASSWORD="todolist"
networks:
- todolist
etcd-keeper:
image: "evildecay/etcdkeeper:latest"
container_name: etcd-keeper
environment:
- ETCD_HOSTS=http://etcd:2379
- SW_STORAGE_ETCD_CLUSTER_NODES=etcd:2379
- HOST=127.0.0.1
- HOSTNAME=etcd-keeper
links:
- etcd
ports:
- "8080:8080"
networks:
- todolist
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- "5672:5672" # AMQP 端口
- "15672:15672" # 管理界面端口
environment:
- RABBITMQ_DEFAULT_USER=guest # 设置 RabbitMQ 默认用户名
- RABBITMQ_DEFAULT_PASS=guest # 设置 RabbitMQ 默认密码
networks:
- todolist
redis:
container_name: redis
image: redis:latest
restart: always
environment:
- REDIS_PASSWORD=micro_todolist
- ALLOW_EMPTY_PASSWORD=no
ports:
- "6379:6379"
volumes:
- /usr/local/redis:/usr/local/redis
networks:
- todolist