0
votes

I'm doing a Cloud Source Repositories auto-sync in my GitHub repo. When I update my codes and manually execute 'gcloud app deploy' using SDK, it was successfully deployed and the website works fine, but when I'm doing automating App Engine deployment using build trigger, the status was successful but it appears 'HTTP ERROR 500' in my website 'https://machine-problem-245503.appspot.com'.

The result when Cloud Builder run after updating code and pushed in GitHub:

enter image description here

The result when I manually run gcloud app deploy using SDK:

enter image description here

In my cloudbuild.yaml:

steps:
- name: "gcr.io/cloud-builders/gcloud"enter code here
args: ["app", "deploy"]
timeout: "1600s"

In my app.yaml:

runtime: php72
# [START handlers]
handlers:
- url: /bootstrap
  static_dir: bootstrap

- url: /css
  static_dir: public/css

- url: /fonts
  static_dir: public/fonts

- url: /img
  static_dir: public/img

- url: /js
  static_dir: public/js

- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico


env_variables:
  ## Put production environment variables here.
  APP_KEY: $keys
  APP_STORAGE: /tmp
  VIEW_COMPILED_PATH: /tmp
  CACHE_DRIVER: database
  SESSION_DRIVER: database
  ## Set these environment variables according to your CloudSQL configuration.
  DB_DATABASE: 
  DB_USERNAME: 
  DB_PASSWORD: 
  DB_SOCKET: "/cloudsql/$project-id"
1
It seems that the link that you provided is working now. Did you manage to deploy the app via Cloud Build or do you still have issues?sotis
yes it's now workingPred

1 Answers

1
votes

Solved this problem by adding these variables in app.yaml

  env_variables:
    APP_SERVICES_CACHE: /tmp/services.php
    APP_PACKAGES_CACHE: /tmp/packages.php