-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (37 loc) · 1.27 KB
/
docker-compose.yml
File metadata and controls
38 lines (37 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
services:
core:
# 默认直接拉取 GitHub Actions 构建并推送到 GHCR 的镜像。
# 可通过环境变量覆盖:
# - VIDEO_HELPER_TAG=sha-<commit> / latest
# - CORE_IMAGE=ghcr.io/<owner>/<repo>-core:<tag>
# NOTE: Docker/OCI 镜像引用要求仓库名必须全小写;GHCR 也建议全小写。
image: ${CORE_IMAGE:-ghcr.io/ldj-creat/video-helper-core:${VIDEO_HELPER_TAG:-latest}}
pull_policy: always
container_name: video-helper-core
restart: unless-stopped
volumes:
- ./data:/app/data
ports:
- "${CORE_HOST_PORT:-8000}:8000"
environment:
- PYTHONUNBUFFERED=1
- PYTHONUTF8=1
- DATA_DIR=/app/data
env_file:
- path: ./services/core/.env
required: false
web:
image: ${WEB_IMAGE:-ghcr.io/ldj-creat/video-helper-web:${VIDEO_HELPER_TAG:-latest}}
pull_policy: always
container_name: video-helper-web
restart: unless-stopped
ports:
- "${WEB_HOST_PORT:-3000}:3000"
environment:
- NODE_ENV=production
# Next.js rewrites() 读取 API_BASE_URL / NEXT_PUBLIC_API_BASE_URL。
# 容器内应访问 core 服务名,而不是 localhost。
- API_BASE_URL=http://core:8000
- NEXT_PUBLIC_API_BASE_URL=http://core:8000
depends_on:
- core