forked from wayn111/waynboot-mall
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-es7-rabbitmq-redis-mysql.yml
62 lines (62 loc) · 1.91 KB
/
docker-compose-es7-rabbitmq-redis-mysql.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
version: '3'
services:
# RabbitMQ
rabbitmq:
image: rabbitmq:3.12.7-management
ports:
- "5672:5672"
- "15672:15672"
container_name: rabbitmq
volumes:
- ./rabbitmq/plugins/rabbitmq_delayed_message_exchange-3.12.0.ez:/plugins/rabbitmq_delayed_message_exchange-3.12.0.ez
- ./rabbitmq/plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins
- ./rabbitmq/data:/var/lib/rabbitmq
- ./rabbitmq/log:/var/lib/rabbitmq
environment:
#rabbitmq的初始用户名
RABBITMQ_DEFAULT_USER: guest
#rabbitmq的初始密码
RABBITMQ_DEFAULT_PASS: guest
network_mode: "host"
# Elasticsearch服务
elasticsearch:
image: elasticsearch:7.14.0
ports:
- "9200:9200"
container_name: elasticsearch
volumes:
- ./es/data:/usr/share/elasticsearch/data
- ./es/plugins:/usr/share/elasticsearch/plugins
- ./es/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- ELASTIC_PASSWORD="123456"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
network_mode: "host"
redis:
container_name: redis
image: redis:6.2.7
ports:
- "16789:16789"
volumes:
- ./redis/redis.conf:/etc/redis/redis.conf
- ./redis/data:/data
command: redis-server /etc/redis/redis.conf
network_mode: "host"
# MySQL服务
mysql:
container_name: mysql
image: mysql:8.0.33
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: '123456'
MYSQL_ALLOW_EMPTY_PASSWORD: 'no'
MYSQL_DATABASE: 'wayn_shop'
volumes:
- ./mysql/data:/var/lib/mysql
- ./db-init:/docker-entrypoint-initdb.d
# - ./mysql/conf.d:/etc/mysql/conf.d
command: mysqld --lower_case_table_names=1 --slow_query_log=1 --max_connections=1000 --default-authentication-plugin=mysql_native_password
network_mode: "host"