Organizing yaml Configuration Files

Note: Services were previously called "modules", and services are still declared in app.yaml files as modules, for example: module: service_name.

Directory structure

Each version of a Java service is defined in an app.yaml file. The YAML file usually takes the same name as the service it defines, but this is not required. If you are deploying several versions of a service, you can create multiple yaml files in the same directory, one for each version.

The app.yaml configuration file defines the scaling type and the CPU, disk, and memory resources for a specific version of a service.

Configuration files in YAML format are used for the Java 8 / Jetty 9.3 and Java 8 runtimes.

The file organization depends on which Java runtime you are using. You might need a WAR file or a JAR file, one for each service in your app. See the appropriate Java runtime developer guide for details.

The default service

Every application has a single default service. The default service is identified in the app.yaml with the setting module: default.

Optional configuration files

These configuration files control optional features that apply to all the services in an app:

To deploy and apply these configuration settings to your App Engine environment, use:

gcloud app deploy dispatch.yaml
gcloud app deploy index.yaml
gcloud app deploy cron.yaml

Send feedback about...

App Engine flexible environment for Java docs