-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·94 lines (90 loc) · 2.26 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
88
89
90
91
92
93
94
version: '2'
services:
mysql:
container_name: mysql
image: mysql:8-oracle
networks:
small:
ipv4_address: 172.19.1.1
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=test
- MYSQL_PASS=test
- MYSQL_DATABASE=jnuwechat
- TZ=Asia/Shanghai
ports:
- "6000:3306"
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
restart: always
volumes:
- "./durable/mysql/data/:/var/lib/mysql/"
- "./durable/mysql/conf/:/etc/mysql/conf.d/"
- "./durable/mysql/init/:/docker-entrypoint-initdb.d/"
redis_master:
container_name: redis_master
image: redis
restart: always
networks:
small:
ipv4_address: 172.19.1.2
environment:
- "TZ=Asia/Shanghai"
ports:
- "6379:6379"
volumes:
- "./durable/redis/conf/:/etc/redis/own/"
- "./durable/redis/data/:/data/"
command:
redis-server /etc/redis/own/redis.conf
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.8.25-management-alpine
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=admin
restart: always
networks:
small:
ipv4_address: 172.19.1.3
privileged: true
volumes:
- "./durable/rabbitmq/data/:/var/lib/rabbitmq/"
- "./durable/rabbitmq/log/:/var/log/rabbitmq/"
ports:
- "15672:15672"
- "5672:5672"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
mongo:
container_name: mongo
image: mongo:4.4
ports:
- '27017:27017'
privileged: true
networks:
small:
ipv4_address: 172.19.1.4
environment:
- "MONGO_INITDB_ROOT_USERNAME=root"
- "MONGO_INITDB_ROOT_PASSWORD=root"
- "MONGO_INITDB_DATABASE=wechat"
- "MONGO_USERNAME=admin123"
- "MONGO_PASSWORD=admin123"
volumes:
- "./durable/mongo/data/:/data/db/"
- "./durable/mongo/mongo_init.sh:/docker-entrypoint-initdb.d/mongo_init.sh"
# 构建网络
networks:
small:
driver: bridge
ipam:
config:
- subnet: 172.19.1.0/16