Miao-Yunzai/docker-compose.yaml

52 lines
3.0 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.

version: "3"
services:
miao-yunzai:
container_name: miao-yunzai
build: # 使用 Dockerfile 本地构建
context: ./docker
args:
BUNDLE_FFMPEG: 'false' # 是否在构建时打包 ffmpeg
BUNDLE_POETRY: 'false' # 是否在构建时打包 poetry
USE_APT_MIRROR: 'true' # 是否在构建时使用 apt 镜像
USE_NPM_MIRROR: 'true' # 是否在构建时使用 npm 镜像
USE_PYPI_MIRROR: 'true' # 是否在构建时使用 pypi 镜像
restart: always
# ports:
# - "50831:50831" # 映射锅巴插件端口,格式"主机端口:容器内部端口"
volumes:
- ./yunzai/config/:/app/Miao-Yunzai/config/config/ # Bot基础配置文件
- ./yunzai/genshin_config:/app/Miao-Yunzai/plugins/genshin/config # 公共Cookie云崽功能配置文件
- ./yunzai/logs:/app/Miao-Yunzai/logs # 日志文件
- ./yunzai/data:/app/Miao-Yunzai/data # 数据文件
- ./yunzai/temp:/app/Miao-Yunzai/temp # 临时文件
# 以下目录是插件目录,安装完插件后需要手动添加映射(如有其他插件请自行添加)
# 映射格式:./yunzai/plugins/<插件目录名>:/app/Miao-Yunzai/plugins/<插件目录名>
# - ./yunzai/plugins/example:/app/Miao-Yunzai/plugins/example # 单js插件目录
- ./yunzai/plugins/miao-plugin:/app/Miao-Yunzai/plugins/miao-plugin # 默认映射喵喵插件
# - ./yunzai/plugins/py-plugin:/app/Miao-Yunzai/plugins/py-plugin # 新py插件
# - ./yunzai/plugins/xiaoyao-cvs-plugin:/app/Miao-Yunzai/plugins/xiaoyao-cvs-plugin # 图鉴插件
#### [警告] 受云崽架构和docker特性限制使用锅巴插件安装的插件无法持久化销毁容器后新安装的插件会消失请谨慎使用 ####
# - ./yunzai/plugins/Guoba-Plugin:/app/Miao-Yunzai/plugins/Guoba-Plugin # 锅巴插件
depends_on:
redis: { condition: service_healthy }
deploy:
resources:
limits:
memory: 2G
redis:
container_name: miao-redis
image: redis:alpine
restart: always
volumes:
# 前往 https://download.redis.io/redis-stable/redis.conf 下载配置文件,放入 ./redis/config 文件夹中
# - ./redis/config:/etc/redis/ # Redis配置文件
- ./redis/data:/data
- ./redis/logs:/logs
# command: /etc/redis/redis.conf # 取消注释以应用Redis配置文件
healthcheck:
test: [ "CMD", "redis-cli", "PING" ]
start_period: 10s
interval: 5s
timeout: 1s