Files
youlai-boot/docker-compose.yml
Ray.Hao 52b4760c89 chore: 字段注释改为单行并删除方法注释的重复描述
- 常量与字段注释由多行 Javadoc 改为单行
- 删除方法注释中复述参数与流程的描述行
2026-09-30 12:40:20 +08:00

74 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Docker Compose 一键安装中间件 MySQL、Redis、RustFS、Xxl-Job
#
# 安装:docker compose up -d
# 卸载:docker compose down(加 -v 同时删除数据卷)
#
# 说明:
# - name 固定项目名,容器统一管理和卸载,避免与其他项目冲突
# - 中间件配置全部内联于 command 参数,无需外部配置文件
# - 数据持久化使用命名卷(docker volume 统一管理),不污染项目目录
# - 对象存储使用 RustFS(S3 协议兼容)
name: youlai-boot
services:
mysql:
image: mysql:8.0.29
container_name: mysql
restart: unless-stopped
# 等价于原 my.cnf 的 utf8mb4 字符集设置(MySQL 8 其余项与默认值一致)
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
- MYSQL_ROOT_PASSWORD=123456
volumes:
- youlai-mysql-data:/var/lib/mysql
ports:
- 3306:3306
redis:
image: redis:7.2.3
container_name: redis
restart: unless-stopped
# --protected-mode no 允许远程连接(原 redis.conf 唯一非默认项)
command: redis-server --requirepass 123456 --appendonly no --protected-mode no
environment:
- TZ=Asia/Shanghai
volumes:
- youlai-redis-data:/data
ports:
- 6379:6379
rustfs:
image: rustfs/rustfs:latest
container_name: rustfs
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
- RUSTFS_ACCESS_KEY=rustfs-admin
- RUSTFS_SECRET_KEY=rustfs-admin
volumes:
- youlai-rustfs-data:/data
ports:
- 9000:9000
- 9001:9001
xxl-job-admin:
image: xuxueli/xxl-job-admin:3.4.2
container_name: xxl-job-admin
restart: unless-stopped
environment:
PARAMS: '--spring.datasource.url=jdbc:mysql://mysql:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=root --spring.datasource.password=123456 --spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver'
volumes:
- youlai-xxljob-logs:/data/applogs
ports:
- 8080:8080
volumes:
youlai-mysql-data:
youlai-redis-data:
youlai-rustfs-data:
youlai-xxljob-logs: