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

Deploy an PHP to App Engine

Hello everyone, first I would like to make it clear that I have no knowledge of the cloud. I have a PHP application that works locally, I'm trying to deploy it to a GCP project. I already created the project, but not exactly the steps I should take. Reading the documentation I realized that I should have created an app.yaml.

I have my project in Github, i also try to build from Github without success.

yaml file:

 

 

 

# Use the PHP 8.1 runtime
runtime: php82

# Defaults to "serve index.php"
entrypoint: serve public/index.php

env_variables:
  ## Put production environment variables here.
  GOOGLE_STORAGE_BUCKET: "valoriza-arte-425514.appspot.com"
  APP_KEY: YOUR_APP_KEY
  APP_STORAGE: /tmp
  VIEW_COMPILED_PATH: /tmp
  SESSION_DRIVER: cookie

 

 

 

The gcloud app deploy command shows:

 

 

 

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build a9323dde-40f0-4a0d-beb0-a29e83c85082 status: FAILURE

 

 

 

I've already followed several suggestions but because I don't really know what I'm doing, I don't know if it makes sense or not. The application is simply a website with endpoints.

 

Thank you in advance

 

2 1 407
1 REPLY 1

You need more information about the possible causes of the error. Try one or more of the following

1. Try running the gcloud deploy command with the --verbosity flag set to debug. Setting the value to debug will display more information during the deploy process and you might find the cause of your issue.

2. Try the deploy with the --log-http flag. The --log-http flag will produce an output of all http requests made during the deploy. You'll see the endpoints being called, the http method, the headers, payload and the duration for each call. Examining those (especially around the 'updating' bit) might show you something that could potentially be of help.

3. You can also try running your App locally with dev_appserver.py which is a close simulation of Production. This can highlight some of the issues of your App with respect to production

Also make sure that billing has been enabled. Someone reported errors which didn't make any sense and enabling billing resolved their issue.

 

  ......NoCommandLine ......
https://nocommandline.com
        Analytics & GUI for 
App Engine & Datastore Emulator