Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Customizing the PHP Runtime

Stay organized with collections Save and categorize content based on your preferences.

You can use custom runtimes to add additional functionality to a PHP app running in the App Engine flexible environment. To configure a custom runtime, replace the following 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

Visit the Custom runtimes documentation to learn how to define a Dockerfile in a custom runtime.

Health checking

By default, all programs running in the flexible environment receive health check requests. The base image responds to the health check request, so you don't have to write your own health check handler. If you're using a different image, you need to disable health checks, or write your own code to handle health check requests.