2021-05-13 16:15:40 +08:00
|
|
|
version: '3'
|
2024-03-20 13:22:16 +08:00
|
|
|
services:
|
2021-05-13 16:15:40 +08:00
|
|
|
mysql:
|
2022-09-14 14:45:54 +08:00
|
|
|
image: mysql:8.0.30
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2021-05-13 16:15:40 +08:00
|
|
|
container_name: mysql
|
|
|
|
volumes:
|
|
|
|
- ../volumes/data/mysqldata:/var/lib/mysql
|
2022-07-08 11:23:35 +08:00
|
|
|
- ./config/my.cnf:/etc/mysql/conf.d/my.cnf
|
2021-05-13 16:15:40 +08:00
|
|
|
# 数据库还原目录 可将需要还原的sql文件放在这里
|
|
|
|
- ./init/mysql:/docker-entrypoint-initdb.d
|
|
|
|
environment:
|
|
|
|
- "MYSQL_ROOT_PASSWORD=lilishop"
|
|
|
|
- "MYSQL_DATABASE=lilishop"
|
|
|
|
- "TZ=Asia/Shanghai"
|
2022-03-01 09:13:39 +08:00
|
|
|
ports:
|
|
|
|
- 3306:3306
|
2021-09-15 15:49:19 +08:00
|
|
|
|
2021-05-13 16:15:40 +08:00
|
|
|
redis:
|
2022-09-14 14:45:54 +08:00
|
|
|
image: redis:7.0.4
|
2021-05-13 16:15:40 +08:00
|
|
|
restart: always
|
2024-03-20 13:22:16 +08:00
|
|
|
container_name: 'lili-redis'
|
2021-05-13 16:15:40 +08:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
2024-03-20 13:22:16 +08:00
|
|
|
volumes:
|
2021-05-13 16:15:40 +08:00
|
|
|
- ../volumes/data/redsidata:/data
|
2022-09-14 14:45:54 +08:00
|
|
|
command: redis-server --port 6379 --requirepass lilishop --appendonly yes --protected-mode no
|
2021-05-13 16:15:40 +08:00
|
|
|
|
|
|
|
elasticsearch:
|
2022-09-14 14:45:54 +08:00
|
|
|
image: elasticsearch:7.17.6
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2024-03-20 13:22:16 +08:00
|
|
|
container_name: lili-elasticsearch
|
2021-05-13 16:15:40 +08:00
|
|
|
volumes:
|
2022-05-31 10:01:11 +08:00
|
|
|
# 映射本地目录权限一定要设置为 777 权限,否则启动不成功
|
2022-06-08 17:37:35 +08:00
|
|
|
# - ../volumes/data/es7/logs:/usr/share/elasticsearch/logs:rw
|
|
|
|
# - ../volumes/data/es7/data:/usr/share/elasticsearch/data:rw
|
2021-05-13 16:15:40 +08:00
|
|
|
- ./config/ik:/usr/share/elasticsearch/plugins/ik
|
2022-09-14 14:45:54 +08:00
|
|
|
# - "./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
|
2024-03-20 13:22:16 +08:00
|
|
|
ports:
|
2021-05-13 16:15:40 +08:00
|
|
|
- "9200:9200"
|
|
|
|
- "9300:9300"
|
|
|
|
environment:
|
2022-09-14 14:45:54 +08:00
|
|
|
- cluster.name=elasticsearch
|
|
|
|
- discovery.type=single-node
|
|
|
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
2021-05-13 16:15:40 +08:00
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "50m"
|
2024-03-20 13:22:16 +08:00
|
|
|
networks:
|
2021-05-13 16:15:40 +08:00
|
|
|
- stack
|
|
|
|
ulimits:
|
|
|
|
nofile:
|
2024-03-20 13:22:16 +08:00
|
|
|
soft: 65535
|
|
|
|
hard: 65535
|
2021-05-13 16:15:40 +08:00
|
|
|
|
|
|
|
kibana:
|
2022-09-14 14:45:54 +08:00
|
|
|
image: docker.elastic.co/kibana/kibana:7.17.6
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2024-03-20 13:22:16 +08:00
|
|
|
container_name: lili-kibana
|
2021-08-03 11:27:12 +08:00
|
|
|
ports:
|
|
|
|
- 5601:5601
|
2024-03-20 13:22:16 +08:00
|
|
|
# volumes:
|
|
|
|
# - "./config/kibana.yml:/usr/share/kibana/config/kibana.yml"
|
|
|
|
networks:
|
2021-05-13 16:15:40 +08:00
|
|
|
- stack
|
2024-03-20 13:22:16 +08:00
|
|
|
depends_on: [ 'elasticsearch' ]
|
2021-05-28 16:22:02 +08:00
|
|
|
|
|
|
|
logstash:
|
2022-09-14 14:45:54 +08:00
|
|
|
image: logstash:7.17.6
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2024-03-20 13:22:16 +08:00
|
|
|
container_name: lili-logstash
|
2021-05-28 16:22:02 +08:00
|
|
|
volumes:
|
|
|
|
- ./config/logstash-springboot.conf:/usr/share/logstash/pipeline/logstash.conf #挂载logstash的配置文件
|
2024-03-20 13:22:16 +08:00
|
|
|
networks:
|
2021-05-28 16:22:02 +08:00
|
|
|
- stack
|
2024-03-20 13:22:16 +08:00
|
|
|
depends_on: [ 'elasticsearch' ]
|
|
|
|
ports:
|
2021-08-03 11:27:12 +08:00
|
|
|
- 4560:4560
|
2024-03-20 13:22:16 +08:00
|
|
|
|
|
|
|
# rocket mq name server
|
2021-05-13 16:15:40 +08:00
|
|
|
rmqnamesrv:
|
2023-06-07 14:19:26 +08:00
|
|
|
image: apache/rocketmq:4.9.6
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2021-05-13 16:15:40 +08:00
|
|
|
container_name: rocket-server
|
2022-09-14 14:45:54 +08:00
|
|
|
# environment:
|
|
|
|
# JAVA_OPT_EXT: "-server -Xms64m -Xmx64m -Xmn64m"
|
2022-10-11 18:16:05 +08:00
|
|
|
# volumes:
|
2024-03-20 13:22:16 +08:00
|
|
|
# 映射本地目录权限一定要设置为 777 权限,否则启动不成功
|
|
|
|
# - ../volumes/data/rocket/server/logs:/home/rocketmq/logs
|
2021-08-10 15:26:28 +08:00
|
|
|
networks:
|
|
|
|
- rocketmq
|
|
|
|
ports:
|
|
|
|
- 9876:9876
|
2022-09-14 14:45:54 +08:00
|
|
|
command: sh mqnamesrv
|
2021-05-13 16:15:40 +08:00
|
|
|
# rocket mq broker
|
|
|
|
rmqbroker:
|
2023-06-07 14:19:26 +08:00
|
|
|
image: apache/rocketmq:4.9.6
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2021-05-13 16:15:40 +08:00
|
|
|
container_name: rocket-broker
|
|
|
|
volumes:
|
2022-10-11 18:16:05 +08:00
|
|
|
# 映射本地目录权限一定要设置为 777 权限,否则启动不成功
|
|
|
|
# - ../volumes/data/rocket/broker/logs:/home/rocketmq/logs
|
|
|
|
# - ../volumes/data/rocket/broker/store:/home/rocketmq/store
|
2023-06-07 14:19:26 +08:00
|
|
|
- ./config/broker.conf:/opt/rocketmq-4.9.6/conf/broker.conf
|
2021-05-13 16:15:40 +08:00
|
|
|
environment:
|
2021-08-10 15:26:28 +08:00
|
|
|
- NAMESRV_ADDR=rmqnamesrv:9876
|
2022-09-14 14:45:54 +08:00
|
|
|
# - JAVA_OPTS:=-Duser.home=/opt
|
2021-05-13 16:15:40 +08:00
|
|
|
- JAVA_OPT_EXT=-server -Xms64m -Xmx64m -Xmn64m
|
|
|
|
depends_on:
|
|
|
|
- rmqnamesrv
|
2021-08-10 15:26:28 +08:00
|
|
|
networks:
|
|
|
|
- rocketmq
|
|
|
|
ports:
|
|
|
|
- 10909:10909
|
|
|
|
- 10911:10911
|
2023-06-07 14:19:26 +08:00
|
|
|
command: sh mqbroker -c /opt/rocketmq-4.9.6/conf/broker.conf
|
2021-05-13 16:15:40 +08:00
|
|
|
# rocket console 这个可以不需要
|
2022-09-14 14:45:54 +08:00
|
|
|
rmqdashboard:
|
|
|
|
image: apacherocketmq/rocketmq-dashboard:1.0.0
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2022-09-14 14:45:54 +08:00
|
|
|
container_name: rocket-dashboard
|
2021-05-13 16:15:40 +08:00
|
|
|
environment:
|
2021-08-10 15:26:28 +08:00
|
|
|
- JAVA_OPTS=-Drocketmq.config.namesrvAddr=rmqnamesrv:9876 -Dserver.port=8180 -Drocketmq.config.isVIPChannel=false
|
2022-09-14 14:45:54 +08:00
|
|
|
# - JAVA_OPT_EXT=-Xms128m -Xmx128m -Xmn128m
|
2021-05-13 16:15:40 +08:00
|
|
|
depends_on:
|
|
|
|
- rmqnamesrv
|
2021-08-10 15:26:28 +08:00
|
|
|
networks:
|
|
|
|
- rocketmq
|
|
|
|
ports:
|
|
|
|
- 8180:8180
|
2021-05-13 16:15:40 +08:00
|
|
|
# xxl-job 分布式调度中心
|
2021-08-10 15:26:28 +08:00
|
|
|
xxl-job:
|
2021-05-13 16:15:40 +08:00
|
|
|
image: xuxueli/xxl-job-admin:2.3.0
|
2021-08-10 15:26:28 +08:00
|
|
|
restart: always
|
2021-05-13 16:15:40 +08:00
|
|
|
container_name: xxl-job
|
|
|
|
environment:
|
2022-09-14 14:45:54 +08:00
|
|
|
- PARAMS=--spring.datasource.url=jdbc:mysql://mysql:3306/lilishop?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=root --spring.datasource.password=lilishop --server.port=9001
|
2021-05-13 16:15:40 +08:00
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
volumes:
|
|
|
|
- ../volumes/data/xxl-job:/data/applogs
|
2022-03-01 09:13:39 +08:00
|
|
|
ports:
|
|
|
|
- 9001:9001
|
2024-03-20 13:22:16 +08:00
|
|
|
networks:
|
2021-08-10 15:26:28 +08:00
|
|
|
rocketmq:
|
|
|
|
driver: bridge
|
2021-05-13 16:15:40 +08:00
|
|
|
stack:
|
|
|
|
driver: bridge
|