앱 서비스의 복잡성에 따라 해당 app.yaml 파일에 몇 가지 요소만 정의해야 할 수 있습니다. 다음 예에서는 가변형 환경에서 PHP 앱이 얼마나 간단한지 확인할 수 있습니다.
app.yaml 파일에 고유한 이름을 지정할 수 있습니다. 하지만 이렇게 하면 배포 명령어에도 파일 이름을 지정해야 합니다. 예를 들어 app.yaml 파일의 이름을 service-name-app.yaml이나 app.flexible.yaml로 지정한 후 다음 중 하나를 사용하여 앱을 배포해야 합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eAn \u003ccode\u003eapp.yaml\u003c/code\u003e file is essential for configuring an App Engine app, specifying details like CPU, memory, network, disk resources, scaling, and environment variables.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file serves as a deployment descriptor for a specific service version of your PHP application, and it must be created for the \u003ccode\u003edefault\u003c/code\u003e service before others.\u003c/p\u003e\n"],["\u003cp\u003eTo use a specific supported version of PHP, you must update the \u003ccode\u003eapp.yaml\u003c/code\u003e file accordingly; the latest version of PHP is used if not otherwise specified.\u003c/p\u003e\n"],["\u003cp\u003eYou can name \u003ccode\u003eapp.yaml\u003c/code\u003e files uniquely, but using a custom name necessitates specifying that file name during the deployment command, such as \u003ccode\u003egcloud app deploy service-name-app.yaml\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSome PHP runtimes have reached their end of support and you are recommended to upgrade your app to the latest version of PHP.\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 [PHP runtimes](/appengine/docs/flexible/lifecycle/support-schedule#php) 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/php/runtime#newversions) to use the latest version of PHP.\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 PHP 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\nPHP version. To use any other [supported version](/appengine/docs/flexible/lifecycle/support-schedule#php) of PHP,\nyou must update your `app.yaml` file. For more information, see\n[PHP runtime](/appengine/docs/flexible/php/runtime). \n\n runtime: php\n env: flex\n\n runtime_config:\n operating_system: \"ubuntu22\"\n document_root: .\n\nDepending on the complexity of your app's service, you might only need to define a few elements in the corresponding `app.yaml` file. The following example demonstrates what a simple PHP app might require in the flexible environment:\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)."]]