fix(ci): #2081 follow-up——CI 部署脚本修复(compose.yml 由 CI scp + --env-file) #2082
Reference in New Issue
Block a user
Delete Branch "fix/ci-worker-compose-followup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
PR #2081 首次合入后 CI staging deploy 失败(Failing after 1m37s),定位到两个问题:
curl从私有 Gitea 拉 compose.yml,但 SSH 到服务器时没有传 Authorization token → 404 → compose sync faildocker compose默认只从 project 目录读.env,没传--env-file ../../.env导致GENERATED_FILES_HOST_DIR must be set变量缺失修改
compose()函数统一加--env-file "$ENV_FILE",确保卷路径等变量正确加载WORKER_IMAGE=... compose up -d --no-deps workerCOMPOSE_SYNC环境变量(0 = CI 已上传,跳过同步)scp infra/docker/compose.yml到服务器$INFRA_DOCKER_DIR/compose.ymlGENERATED_FILES_HOST_DIR、GENERATION_CONCURRENCY=2、TRANSCODE_CONCURRENCY=2、BEAT_ENABLED=1,新 compose 启动后会直接使用这些值影响
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #2082 已关闭或合并,对应的预览环境已被清理。