Organizing Configuration Files

Directory structure

Each version of a Ruby 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.

Typically, you create a directory for each service, which contains the service's YAML files and associated source code. Optional application-level configuration files (dispatch.yaml, index.yaml and cron.yaml) are included in the top level app directory. The example below shows three services. In service1 the source files are contained in a subdirectory, in service2 they are at the same level as the yaml file; service3 has yaml files for two versions:

Hierarchy graph of YAML services

For small, simple projects, all the app's files can live in one directory:

Hierarchy graph of small YAML services

The default service

Every application has a single default service. The default service can be optionally specified in the app.yaml with the setting service: 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 Ruby docs