Github动作将django应用程序部署到弹性豆茎

hmae6n7t  于 2023-01-18  发布在  Go
关注(0)|答案(1)|浏览(136)

我只是尝试使用github操作将我的django应用程序部署到elastic beanstalk,但一直收到这些错误:

Warning: Environment update finished, but health is Red and health status is Degraded. Giving it 30 seconds to recover...
Warning: Environment still has health: Red and health status Degraded. Waiting 19 more seconds before failing...
Warning: Environment still has health: Red and health status Degraded. Waiting 8 more seconds before failing...
Error: Deployment failed: Error: Environment still has health Red 30 seconds after update finished!

这是我下面使用的代码:

name: AWS Deploy
on:
  push:
    branches:
      - test-main-branch

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source code
        uses: actions/checkout@v2

  - name: Generate deployment package
    run: zip -r deploy.zip . -x '*.git*'

  - name: Get timestamp
    uses: gerred/actions/current-time@master
    id: current-time

  - name: Run string replace
    uses: frabert/replace-string-action@master
    id: format-time
    with:
      pattern: '[:\.]+'
      string: "${{ steps.current-time.outputs.time }}"
      replace-with: "-"
      flags: "g"

  - name: Deploy to EB
    uses: einaregilsson/beanstalk-deploy@v20
    with:
      aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
      aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      application_name: project-pit
      environment_name: project-pit-cloud
      version_label: 12345
      region: ap-southeast-2
      deployment_package: deploy.zip

  - name: Deployed!
    run: echo App deployed

应用程序显示在我的s3桶,但我仍然得到一个降级的健康在我的弹性豆茎。
我还应该提到,我的s3桶是一个以上的水平深,桶/项目坑

yxyvkwin

yxyvkwin1#

uses: einaregilsson/beanstalk-deploy@v20
    with:
      aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
      aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      application_name: project-pit
      environment_name: project-pit-cloud
      version_label: 12345
      region: ap-southeast-2
      deployment_package: deploy.zip
      wait_for_environment_recovery: 60

相关问题