Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Working Express JS App Fails Readiness Check

I have an Express JS app with a 'GET /' endpoint that automatically returns a '200 OK' response.

I am deploying it from Github with this action:

 

name: Deploy to App Engine
on:
  push:
    paths:
      - "server/**"
    branches:
      - production
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3
    - name: Deploy to App Engine
      uses: google-github-actions/deploy-appengine@v0.2.0
      with:
        deliverables: server/app.yaml
        version: next
        project_id: MY_PROJECT
        credentials: MY_CREDENTIALS

 

The deployment runs successfully, but calling the health-check endpoint throws a 503 response with the following message in logs:

"The request failed because the instance failed the readiness check."

However, the same code works fine when I deploy it manually with this command:

 

gcloud app deploy --verbosity=debug --version=[new version number]

 

The command causes the same issue when I take out the verbosity flag.

How can I fix this?

0 0 178
0 REPLIES 0