Configuring your app with app.yaml Stay organized with collections Save and categorize content based on your preferences.
Note: SomeRuby runtimes have reachedend of support. You cannot re-deployversions that use runtimes after their end of support date. We recommend thatyouupgrade your appto use the latest version of Ruby.
An App Engine app is configured using anapp.yamlfile, that contains CPU, memory, network and disk resources, scaling, and othergeneral settings including environment variables.
Aboutapp.yaml files
You can specify the runtime configuration for your Ruby app,including versions and URLs, in theapp.yaml file. This file acts as a deployment descriptor of a specificserviceversion. You must first create theapp.yaml file for thedefault service of your appbefore you can create and deployapp.yaml files for additional services.
The followingapp.yaml demonstrates how to configure your app to use the latestRuby version. To use any othersupported version of Ruby,you must update yourapp.yaml file. For more information, seeRuby runtime.
runtime:rubyenv:flexentrypoint:bundle exec ruby app.rbruntime_config:operating_system:ubuntu22# This sample incurs costs to run on the App Engine flexible environment.# The settings below are to reduce costs during testing and are not appropriate# for production use. For more information, see:# https://cloud.google.com/appengine/docs/flexible/ruby/configuring-your-app-with-app-yamlmanual_scaling:instances:1resources:cpu:1memory_gb:0.5disk_size_gb:10Depending on the complexity of your app's service, you might only need to definea few elements in the correspondingapp.yaml file. The following exampledemonstrates what a simple Ruby app might require in theflexible environment:
You can specify a unique name for yourapp.yaml files, but then you mustspecify the file name with thedeploymentcommandas well. For example, if you name yourapp.yaml fileservice-name-app.yamlorapp.flexible.yaml, then you must deploy your app using either:
gcloudappdeployservice-name-app.yamlgcloudappdeployapp.flexible.yamlapp.yaml files in yourapp, seeStructuring web services.All configuration elements
For a complete list of all the supported elements in this configuration file,see theapp.yaml reference.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.