Files
dj/huobao-source/docker-compose.yml

48 lines
1.7 KiB
YAML
Raw Permalink 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 一体化部署:应用 + Watchtower(自动拉新镜像重建容器,支撑应用内一键更新)
#
# 使用:
# 1. 复制 .env.example 为 .env 并修改 WATCHTOWER_TOKEN(两端必须一致)
# 2. docker compose up -d
# 3. 访问 http://localhost:5679 ,设置页「关于更新」可检查/一键更新
#
# 数据持久化在命名卷 huobao-data(SQLite + 生成的图片/视频 + 可在线编辑的 workspace/skills)。
services:
app:
image: huobao/huobao-drama:latest
build:
context: .
args:
# 构建时注入版本号(发布镜像时务必指定,如 HUOBAO_VERSION=1.2.0)
HUOBAO_VERSION: ${HUOBAO_VERSION:-dev}
ports:
- "5679:5679"
environment:
# 配置后设置页「关于更新」出现「立即更新」按钮;删除这两行则退化为手动更新提示
HUOBAO_WATCHTOWER_URL: http://watchtower:8080
HUOBAO_WATCHTOWER_TOKEN: ${WATCHTOWER_TOKEN:-please-change-me}
# 发布清单(默认 GitHub Releases latest.json,与桌面版同一份)
# HUOBAO_UPDATE_FEED: https://github.com/chatfire-AI/huobao-drama/releases/latest/download/latest.json
volumes:
- huobao-data:/app/data
labels:
# Watchtower --label-enable:只更新显式标记的容器
com.centurylinklabs.watchtower.enable: "true"
restart: unless-stopped
watchtower:
image: containrrr/watchtower:latest
command: >
--http-api-update
--http-api-token ${WATCHTOWER_TOKEN:-please-change-me}
--label-enable
--cleanup
--rolling-restart
--interval 86400
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
volumes:
huobao-data: