Files
storyforge/deploy/storyforge-fnos-live-recorder.compose.yaml
2026-03-23 09:08:10 +08:00

60 lines
2.2 KiB
YAML

services:
# StoryForge server-side live recorder for multi-platform sources.
#
# Recommended upstream source repo:
# /Users/kris/code/DouyinLiveRecorder-main
#
# Rationale:
# - Supports 40+ live platforms.
# - Linux/Docker friendly.
# - Exposes HTTP APIs that StoryForge can call directly:
# GET /api/healthz
# GET /api/status-lite
# GET /api/status
# GET /api/recordings
# POST /api/url-config/import
# POST /api/url-config/set-enabled
# POST /api/recorder/start
# POST /api/recorder/stop
# GET /api/downloads
# GET /downloads/<path>
#
# Suggested fnOS state root:
# /vol1/docker/hyzq-stack/shared/storyforge-live-recorder
#
# Suggested fnOS external port:
# 19106
#
# Example StoryForge call flow:
# 1. POST /api/url-config/import
# {"raw":"原画,https://live.kuaishou.com/u/anchor123"}
# 2. POST /api/recorder/start
# 3. Poll GET /api/status-lite or /api/recordings
# 4. Read output via GET /api/downloads or /downloads/<path>
storyforge-live-recorder:
image: ihmily/douyin-live-recorder:latest
container_name: storyforge-live-recorder
restart: unless-stopped
tty: true
stdin_open: true
command: ["python", "webui.py", "--host", "0.0.0.0", "--port", "8899"]
ports:
- "${STORYFORGE_LIVE_RECORDER_PORT:-19106}:8899"
environment:
TERM: xterm-256color
TZ: ${TZ:-Asia/Shanghai}
WEBUI_HOST: 0.0.0.0
WEBUI_PORT: 8899
RECORDER_PYTHON: python
volumes:
- "${STORYFORGE_LIVE_RECORDER_STATE_ROOT:-/vol1/docker/hyzq-stack/shared/storyforge-live-recorder}/config:/app/config"
- "${STORYFORGE_LIVE_RECORDER_STATE_ROOT:-/vol1/docker/hyzq-stack/shared/storyforge-live-recorder}/logs:/app/logs"
- "${STORYFORGE_LIVE_RECORDER_STATE_ROOT:-/vol1/docker/hyzq-stack/shared/storyforge-live-recorder}/backup_config:/app/backup_config"
- "${STORYFORGE_LIVE_RECORDER_STATE_ROOT:-/vol1/docker/hyzq-stack/shared/storyforge-live-recorder}/downloads:/app/downloads"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8899/api/healthz', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s