Stay organized with collectionsSave and categorize content based on your preferences.
An App Engine app is configured using anapp.yamlfile, that contains CPU, memory, network and disk resources, scaling, and other
general settings including environment variables.
Aboutapp.yamlfiles
You can specify the runtime configuration for your Ruby app,
including versions and URLs, in theapp.yamlfile. This file acts as a deployment descriptor of a specificserviceversion.
You must first create theapp.yamlfile for thedefaultservice of your app
before you can create and deployapp.yamlfiles for additional services.
The followingapp.yamldemonstrates how to configure your app to use the latest
Ruby version. To use any othersupported versionof Ruby,
you must update yourapp.yamlfile. 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:10
Depending on the complexity of your app's service, you might only need to define
a few elements in the correspondingapp.yamlfile. The following example
demonstrates what a simple Ruby app might require in the
flexible environment:
You can specify a unique name for yourapp.yamlfiles, but then you must
specify the file name with thedeployment
commandas well. For example, if you name yourapp.yamlfileservice-name-app.yamlorapp.flexible.yaml, then you must deploy your app using either:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eapp.yaml\u003c/code\u003e files are used to configure App Engine apps, defining resources like CPU, memory, and scaling, as well as environment variables.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file specifies the runtime configuration for your Ruby app, including the Ruby version and URLs, and it's a deployment descriptor for a specific service version.\u003c/p\u003e\n"],["\u003cp\u003eYou must create an \u003ccode\u003eapp.yaml\u003c/code\u003e file for the \u003ccode\u003edefault\u003c/code\u003e service before creating files for additional services.\u003c/p\u003e\n"],["\u003cp\u003eWhile you can use custom names for \u003ccode\u003eapp.yaml\u003c/code\u003e files, you must include the file name when using the deployment command.\u003c/p\u003e\n"],["\u003cp\u003eSome older Ruby runtimes have reached their end of support, preventing redeployment, and users are recommended to upgrade to the latest Ruby version.\u003c/p\u003e\n"]]],[],null,["# Configuring your app with app.yaml\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n| **Note:** Some [Ruby runtimes](/appengine/docs/flexible/lifecycle/support-schedule#ruby) have reached [end of support](/appengine/docs/flexible/lifecycle/runtime-lifecycle#end_of_support). You cannot re-deploy versions that use runtimes after their end of support date. We recommend that you [upgrade your app](/appengine/docs/flexible/ruby/runtime#newversions) to use the latest version of Ruby.\n\n\u003cbr /\u003e\n\n\nAn App Engine app is configured using an `app.yaml`\nfile, that contains CPU, memory, network and disk resources, scaling, and other\ngeneral settings including environment variables.\n\n\nAbout `app.yaml` files\n----------------------\n\n\u003cbr /\u003e\n\nYou can specify the runtime configuration for your Ruby app, including versions and URLs, in the `app.yaml` file. This file acts as a deployment descriptor of a specific [service](/appengine/docs/flexible/an-overview-of-app-engine) version.\n\n\u003cbr /\u003e\n\n\nYou must first create the `app.yaml` file for the `default` service of your app\nbefore you can create and deploy `app.yaml` files for additional services.\n\n\nThe following `app.yaml` demonstrates how to configure your app to use the latest\nRuby version. To use any other [supported version](/appengine/docs/flexible/lifecycle/support-schedule#ruby) of Ruby,\nyou must update your `app.yaml` file. For more information, see\n[Ruby runtime](/appengine/docs/flexible/ruby/runtime). \n\n runtime: ruby\n env: flex\n entrypoint: bundle exec ruby app.rb\n\n runtime_config:\n operating_system: ubuntu22\n\n # This sample incurs costs to run on the App Engine flexible environment.\n # The settings below are to reduce costs during testing and are not appropriate\n # for production use. For more information, see:\n # https://cloud.google.com/appengine/docs/flexible/ruby/configuring-your-app-with-app-yaml\n manual_scaling:\n instances: 1\n resources:\n cpu: 1\n memory_gb: 0.5\n disk_size_gb: 10\n\n\nDepending on the complexity of your app's service, you might only need to define\na few elements in the corresponding `app.yaml` file. The following example\ndemonstrates what a simple Ruby app might require in the\nflexible environment:\n\n\nYou can specify a unique name for your `app.yaml` files, but then you must\nspecify the file name with the [deployment\ncommand](/appengine/docs/flexible/testing-and-deploying-your-app)\nas well. For example, if you name your `app.yaml` file `service-name-app.yaml`\nor `app.flexible.yaml`, then you must deploy your app using either: \n\n gcloud app deploy service-name-app.yaml\n gcloud app deploy app.flexible.yaml\n\nTo learn more about structuring multiple services and `app.yaml` files in your app, see [Structuring web services](/appengine/docs/flexible/configuration-files).\n\n\u003cbr /\u003e\n\nAll configuration elements\n--------------------------\n\nFor a complete list of all the supported elements in this configuration file,\nsee the\n[`app.yaml` reference](/appengine/docs/flexible/reference/app-yaml)."]]