An App Engine app is configured using an
file, that contains CPU, memory, network and disk resources, scaling, and other
general settings including environment variables.
You can specify the runtime configuration for your PHP app,
including versions and URLs, in the
app.yamlfile. This file acts as a deployment descriptor of a specific service version.
You must first create the
app.yaml file for the
default service of your app
before you can create and deploy
app.yaml files for additional services.
For PHP version 7.4 and later, you must include the
operating_system settings in your
app.yaml to specify an operating system.
You can optionally specify a runtime version by including the
setting in your
app.yaml. By default, the latest PHP version is used if the
runtime_version setting is not specified.
v7.4 and later
runtime: php env: flex runtime_config: operating_system: "ubuntu22" document_root: .
v7.3 and earlier
runtime: php env: flex runtime_config: document_root: web
app.yamlfile. The following example demonstrates what a simple PHP app might require in the flexible environment:
You can specify a unique name for your
app.yaml files, but then you must
specify the file name with the deployment
as well. For example, if you name your
app.flexible.yaml, then you must deploy your app using either:
To learn more about structuring multiple services and
gcloud app deploy service-name-app.yaml gcloud app deploy app.flexible.yaml
app.yamlfiles in your app, see Structuring web services.
All configuration elements
For a complete list of all the supported elements in this configuration file,