diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 81b4bca63..ebca10fdd 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -9,7 +9,7 @@ on: jobs: deploy-staging: name: Deploy Staging - runs-on: ubuntu-22.04 + runs-on: saas if: github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref_name, 'feature/') steps: @@ -140,7 +140,7 @@ jobs: build-production-runtime-images: name: Build Production Runtime Images - runs-on: ubuntu-22.04 + runs-on: saas if: startsWith(github.ref, 'refs/tags/v') steps: @@ -249,7 +249,7 @@ jobs: deploy-production: name: Deploy Production - runs-on: ubuntu-22.04 + runs-on: saas if: startsWith(github.ref, 'refs/tags/v') needs: build-production-runtime-images @@ -290,7 +290,7 @@ jobs: production-e2e: name: Production Browser E2E - runs-on: ubuntu-22.04 + runs-on: saas if: startsWith(github.ref, 'refs/tags/v') needs: deploy-production diff --git a/infra/docker/compose.yml b/infra/docker/compose.yml index 5bbbaee69..e97d92c3b 100644 --- a/infra/docker/compose.yml +++ b/infra/docker/compose.yml @@ -120,12 +120,13 @@ services: - xiaoxia-net # 健康检查配置 + # 注:celery inspect ping 依赖 broker 连接,在容器内不可靠,改用进程检查 healthcheck: - test: ["CMD-SHELL", "celery -A app.celery_app inspect ping --timeout 5 || exit 1"] + test: ["CMD-SHELL", "pgrep -f 'celery.*worker' || exit 1"] interval: 30s timeout: 10s retries: 3 - start_period: 40s + start_period: 30s logging: *default-logging