|
@@ -1,41 +1,35 @@
|
|
|
services:
|
|
services:
|
|
|
pipeline:
|
|
pipeline:
|
|
|
build: .
|
|
build: .
|
|
|
- # The image runs as the non-root `node` user for Kubernetes. For local dev
|
|
|
|
|
- # we override back to root so the ./output bind mount keeps working
|
|
|
|
|
- # regardless of the host user's uid; Kubernetes sets fsGroup instead.
|
|
|
|
|
- user: "0:0"
|
|
|
|
|
|
|
+ # Run as the image's non-root `node` user by default (uid 1000 == host
|
|
|
|
|
+ # `lkattey` here, and the same user Kubernetes runs the image as, so local
|
|
|
|
|
+ # compose mirrors prod's filesystem ownership). Bind-mounted files (./output,
|
|
|
|
|
+ # ./.data) therefore stay host-accessible instead of root-owned. On a host
|
|
|
|
|
+ # whose uid isn't 1000, set HOST_UID/HOST_GID (in .env or the shell) to your
|
|
|
|
|
+ # numeric uid:gid so the bind mounts match your user.
|
|
|
|
|
+ user: "${HOST_UID:-node}:${HOST_GID:-node}"
|
|
|
ports:
|
|
ports:
|
|
|
- "${PORT:-13000}:3000"
|
|
- "${PORT:-13000}:3000"
|
|
|
|
|
+ # Pass EVERY variable from .env (API keys, OSS, Feishu, SCHEDULES,
|
|
|
|
|
+ # SCHEDULER_ENABLED, LOG_LEVEL, …) into the container automatically via
|
|
|
|
|
+ # env_file — no per-variable list to maintain. The previous explicit list
|
|
|
|
|
+ # silently dropped any var not enumerated, so new knobs set in .env never
|
|
|
|
|
+ # reached the container. `environment` below only adds container-specific
|
|
|
|
|
+ # defaults for keys that may be absent from .env, and overrides env_file for
|
|
|
|
|
+ # those keys.
|
|
|
|
|
+ env_file:
|
|
|
|
|
+ - .env
|
|
|
environment:
|
|
environment:
|
|
|
- - OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
|
|
|
- - OPENAI_BASE_URL=${OPENAI_BASE_URL}
|
|
|
|
|
- - OPENAI_TTS_API_KEY=${OPENAI_TTS_API_KEY}
|
|
|
|
|
- - OPENAI_TTS_BASE_URL=${OPENAI_TTS_BASE_URL}
|
|
|
|
|
- - FISH_AUDIO_API_KEY=${FISH_AUDIO_API_KEY}
|
|
|
|
|
- - MINIMAX_API_KEY=${MINIMAX_API_KEY}
|
|
|
|
|
- - MINIMAX_GROUP_ID=${MINIMAX_GROUP_ID}
|
|
|
|
|
- - ELEVENLABS_API_KEY=${ELEVENLABS_API_KEY}
|
|
|
|
|
- # Unified output + cache retention
|
|
|
|
|
- OUTPUT_DIR=${OUTPUT_DIR:-/app/output}
|
|
- OUTPUT_DIR=${OUTPUT_DIR:-/app/output}
|
|
|
- OUTPUT_RETENTION_DAYS=${OUTPUT_RETENTION_DAYS:-30}
|
|
- OUTPUT_RETENTION_DAYS=${OUTPUT_RETENTION_DAYS:-30}
|
|
|
- # Container timezone — keeps logs, ffmpeg, and new Date() on Beijing time
|
|
|
|
|
- # so the daily-trending cover date never rolls over a day early/late.
|
|
|
|
|
- TZ=${TZ:-Asia/Shanghai}
|
|
- TZ=${TZ:-Asia/Shanghai}
|
|
|
- # OSS (Alibaba Cloud Object Storage) — publish stage
|
|
|
|
|
- - OSS_ACCESS_KEY_ID=${OSS_ACCESS_KEY_ID:-}
|
|
|
|
|
- - OSS_ACCESS_KEY_SECRET=${OSS_ACCESS_KEY_SECRET:-}
|
|
|
|
|
- - OSS_REGION=${OSS_REGION:-}
|
|
|
|
|
- - OSS_BUCKET=${OSS_BUCKET:-}
|
|
|
|
|
- - OSS_ENDPOINT=${OSS_ENDPOINT:-}
|
|
|
|
|
- - OSS_PATH=${OSS_PATH:-}
|
|
|
|
|
- - OSS_PUBLIC_DOMAIN=${OSS_PUBLIC_DOMAIN:-}
|
|
|
|
|
- # Feishu custom-bot webhook — publish stage
|
|
|
|
|
- - FEISHU_WEBHOOK_URL=${FEISHU_WEBHOOK_URL:-}
|
|
|
|
|
- - FEISHU_WEBHOOK_SECRET=${FEISHU_WEBHOOK_SECRET:-}
|
|
|
|
|
|
|
+ - TIMEZONE=${TIMEZONE:-Asia/Shanghai}
|
|
|
volumes:
|
|
volumes:
|
|
|
- ./output:/app/output
|
|
- ./output:/app/output
|
|
|
- - pipeline-jobs:/tmp/pipeline-jobs
|
|
|
|
|
|
|
+ # Bind mount (pre-created as uid 1000 on the host) instead of a named
|
|
|
|
|
+ # volume: named volumes are root-owned, which the non-root container
|
|
|
|
|
+ # (uid 1000) below couldn't write to. .data is gitignored.
|
|
|
|
|
+ - ./.data/pipeline-jobs:/tmp/pipeline-jobs
|
|
|
# Use public DNS resolvers directly. The container inherits the host's
|
|
# Use public DNS resolvers directly. The container inherits the host's
|
|
|
# resolver, which can silently fail to resolve some public domains (e.g.
|
|
# resolver, which can silently fail to resolve some public domains (e.g.
|
|
|
# open.feishu.cn behind a VPN/proxy) and break the Feishu webhook. Override
|
|
# open.feishu.cn behind a VPN/proxy) and break the Feishu webhook. Override
|
|
@@ -44,6 +38,3 @@ services:
|
|
|
- ${DNS_SERVER_1:-223.5.5.5}
|
|
- ${DNS_SERVER_1:-223.5.5.5}
|
|
|
- ${DNS_SERVER_2:-114.114.114.114}
|
|
- ${DNS_SERVER_2:-114.114.114.114}
|
|
|
restart: unless-stopped
|
|
restart: unless-stopped
|
|
|
-
|
|
|
|
|
-volumes:
|
|
|
|
|
- pipeline-jobs:
|
|
|