Files
capcut-mate/docker-compose.example.yaml
T
HommyandClaude Code 0ab685ae58 docker-compose.example.yaml 默认引用 .env 配置。
通过 env_file 引入 .env(required: false,缺省时可正常启动),
用于注入对象存储密钥等变量;environment 保持原有固定值不变。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-06 19:57:32 +08:00

36 lines
1.9 KiB
YAML
Raw 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.
services:
capcut-mate:
image: gogoshine/capcut-mate:latest
#image: gogoshine/capcut-mate:sha-190a61f
ports:
- "30000:30000"
volumes:
- ./logs:/app/logs
- /opt/1panel/apps/openresty/openresty/www/sites/capcut-mate.jcaigc.cn/index/output:/app/output # 挂载配置文件目录
# 默认引用 .env 配置(对象存储密钥等),首次使用先执行:cp .env.example .env
# required: false 表示 .env 不存在时仍可启动(需要 Docker Compose v2.24+)
# 注意:下方 environment 为固定值,优先级高于 .env,同名变量不会被 .env 覆盖
env_file:
- path: .env
required: false
environment:
# 草稿下载URL
- DRAFT_URL=https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft
# 用于将容器内部的文件路径转成URL,本质是将/app/替换成DOWNLOAD_URL得到下载路径
- DOWNLOAD_URL=https://capcut-mate.jcaigc.cn/
# 草稿提示URL
- TIP_URL=https://docs.jcaigc.cn
# 文件下载大小限制(字节),默认200MB(209715200)
- DOWNLOAD_FILE_SIZE_LIMIT=209715200
# 草稿清理策略(本模块内定义;保留数量可由环境变量 DRAFT_CLEANUP_MAX_DRAFT_COUNT 覆盖,默认 1000)
- DRAFT_CLEANUP_MAX_DRAFT_COUNT=6000
# 远程媒体 URL 直写模式:false=下载到本地(默认);true=草稿仅写入 URL,不下载
- USE_REMOTE_MEDIA_URL=false
mem_limit: 2G # 内存限制
memswap_limit: 2G # 总内存(物理内存 + Swap)限制
cpus: '2' # CPU使用率限制为150%,即容器最多可以使用1.5个完整的CPU核心
oom_score_adj: -500 # 调整 OOM 杀手优先级
restart: unless-stopped # 除非手动停止,否则总是重启容器
container_name: capcut-mate # 这里指容器名称,非必需,不指定时,名称为:<项目名称>-<服务名称>-<序号>
#entrypoint: ["/bin/sh", "-c", "sleep 10000"]