Defining Runtime Settings

A Java 11 app in App Engine is configured using an app.yaml file, that contains the runtime, handlers, scaling, and other general settings including environment variables.

About app.yaml files

Specify all the runtime configuration for your Java 11 app, including versions and URLs, in the app.yaml file. 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.

You can specify a unique name for your app.yaml files, but then you must specify the file name with the deployment command as well. For example, if you name your app.yaml file service-name-app.yaml or app.standard.yaml, then you must deploy your app using either:

gcloud app deploy service-name-app.yaml
gcloud app deploy app.standard.yaml
To learn more about structuring multiple services and app.yaml files in your app, see Structuring Web Services.

Generally, your app.yaml file requires only the runtime element for a simple Java 11 app in the standard environment, for example:

runtime: java11

If you don't create an app.yaml file, the gcloud app deploy command can create one when you deploy your application. The app.yaml file that App Engine creates contains only the settings that are required to run your application.

All configuration elements

For a complete list of all the supported elements in this configuration file, see the app.yaml reference.