-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
30 lines (29 loc) · 1.27 KB
/
docker-compose.yaml
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
version: "3"
services:
yunzai-bot:
build: . # 使用 Dockerfile 本地构建
# image: ccr.ccs.tencentyun.com/xm798/yunzai-bot:latest # 使用镜像
# image: swr.cn-south-1.myhuaweicloud.com/sirly/yunzai-bot:latest # 备用精简镜像
restart: always
volumes:
- ./Yunzai/config.js:/app/Yunzai-Bot/config/config.js # config.js 配置文件,配置文件中 redis 地址填写 "redis"
- ./Yunzai/logs:/app/Yunzai-Bot/logs # 日志文件
- ./Yunzai/data:/app/Yunzai-Bot/data # 数据文件
# 以下目录映射有需要可创建对应文件夹,并自行取消注释。
# - ./Yunzai/global_img:/app/Yunzai-Bot/resources/global_img # 全局表情目录
# - ./Yunzai/global_record:/app/Yunzai-Bot/resources/global_record # 全局语音目录
# - ./Yunzai/lib/example:/app/Yunzai-Bot/lib/example # 自定义js插件目录
# - ./Yunzai/plugins:/app/Yunzai-Bot/plugins # 插件目录
depends_on:
redis: { condition: service_healthy }
redis:
image: "redis:alpine"
restart: always
volumes:
- ./redis/data:/data
- ./redis/logs:/logs
healthcheck:
test: ["CMD", "redis-cli", "PING"]
start_period: 10s
interval: 5s
timeout: 1s