补充部署失败时容器诊断日志输出

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-05-01 12:07:52 +08:00
parent 607512a1a4
commit ef15f0329f
+7 -1
View File
@@ -257,5 +257,11 @@ jobs:
}
pull_with_retry
${COMPOSE_CMD} --env-file .env --env-file .images.env -f docker-compose.prod.yml up -d --remove-orphans
if ! ${COMPOSE_CMD} --env-file .env --env-file .images.env -f docker-compose.prod.yml up -d --remove-orphans; then
echo "[error] docker compose up failed, collecting container diagnostics..."
${COMPOSE_CMD} --env-file .env --env-file .images.env -f docker-compose.prod.yml ps || true
docker logs --tail 300 fquiz-api || true
docker logs --tail 200 fquiz-db || true
exit 1
fi
${COMPOSE_CMD} --env-file .env --env-file .images.env -f docker-compose.prod.yml ps