## Docker-compose 使用示例
docker-compose.yaml文件
```
version: "3"
services:
ifile:
container_name: "ifile"
image: lgs821/ifile
restart: always
ports:
- "3030:3030"
depends_on:
- mysql
- aria2
volumes:
- "/www/ifile/conf:/ifile/conf"
- "/www/ifile/files:/ifile/files"
- "/www/ifile/data:/ifile/data"
- "/www/ifile/assets:/ifile/assets"
- "/www/ifile/tmp:/ifile/tmp"
- "/www/ifile/thumb:/ifile/thumb"
- "/www/ifile/logs:/ifile/logs"
- "/mnt/data:/mnt/data"
- "/mnt/disk/downloads:/downloads"
aria2:
container_name: "aria2"
image: p3terx/aria2-pro
restart: always
environment:
- UMASK_SET=022
- RPC_SECRET=Password
- RPC_PORT=6800
- LISTEN_PORT=6888
ports:
- "6800:6800"
- "6888:6888"
- "6888:6888/udp"
volumes:
- "/www/aria2/config:/config"
- "/mnt/disk/downloads:/downloads"
mysql:
image: mysql
ports:
- "3306:3306"
volumes:
- /www/mysql/data:/var/lib/mysql
- /www/mysql/conf:/etc/mysql/conf.d
- /www/mysql/logs:/data/mysql/logs
restart: always
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=MysqlPassword
- MYSQL_DATABASE=ifile
- MYSQL_USER=ifile
- MYSQL_PASSWORD=ifile
container_name: "mysql"
```
修改映射路径为您自己的路径即可
aria2的/downloads 和ifile的/downloads路径需一致,在系统aria2设置里填写映射后的路径
修改mysql的root密码和新建数据库信息为您自定义的。