Files
WeChatBot/deploy/record-bot.compose.yaml
2026-12-04 09:44:59 +08:00

40 lines
1.5 KiB
YAML

# 仅 record-bot — 服务器上不需要源码,只拉镜像
# 1Panel:容器 → 编排,粘贴本文件;配合 .env
#
# 镜像由本机 build-push 推到仓库后,这里改 RECORD_BOT_IMAGE 即可更新
services:
record-bot:
image: ${RECORD_BOT_IMAGE:?set RECORD_BOT_IMAGE e.g. docker.io/you/record-bot:latest}
container_name: record-bot
restart: unless-stopped
ports:
- "${RECORD_BOT_PORT:-5080}:8080"
environment:
ASPNETCORE_ENVIRONMENT: Production
TZ: Asia/Shanghai
# 分开部署:同网络用 http://weixin-ilink-gateway:3000,或宿主机 http://172.17.0.1:29527
Gateway__BaseUrl: ${GATEWAY_BASE_URL:-http://weixin-ilink-gateway:3000}
Gateway__ApiKey: ${GATEWAY_API_KEY:?set GATEWAY_API_KEY}
RecordBot__WebhookToken: ${RECORD_WEBHOOK_TOKEN:-}
RecordBot__ReplyOnRecord: "true"
RecordBot__ConnectionString: "Data Source=/app/data/records.db"
RecordBot__MediaDir: /app/data/media
RecordBot__BackupDir: /app/data/backups
RecordBot__TimeZoneId: Asia/Shanghai
Llm__Enabled: ${LLM_ENABLED:-true}
Llm__ApiKey: ${LLM_API_KEY:-}
Llm__BaseUrl: ${LLM_BASE_URL:-https://dashscope.aliyuncs.com/compatible-mode/v1}
Llm__Model: ${LLM_MODEL:-qwen3.8-max}
volumes:
- ${RECORD_DATA_DIR:-./data/record-bot}:/app/data
networks:
- wechatbot
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
wechatbot:
external: true
name: ${DOCKER_NETWORK:-wechatbot}