Customizing the PHP Runtime

You can use custom runtimes to add additional functionality to a PHP app running in the flexible environment. To configure a custom runtime, you replace this line in your app.yaml file:

runtime: php

with this line:

runtime: custom

You must also add a Dockerfile in the same directory that contains the app.yaml file. For building PHP containers, Google provides this base image:

Base Image Health Checks Yes

You can automatically generate the Dockerfile for your current runtime using gen-config:

gcloud beta app gen-config --custom

Health checking

By default, all programs running in the flexible environment receive health check requests If a base image supports health checking, you don't need to write any additional code. If it does not, you will need to disable health checks, or write your own code to handle health check requests.