App Engine 앱은 런타임, 핸들러, 확장, 환경 변수를 비롯한 기타 일반 설정이 포함된 app.yaml 파일을 사용하여 구성됩니다.
app.yaml 파일 정보
버전과 URL이 포함된 자바 앱의 런타임 구성을 app.yaml 파일에 지정할 수 있습니다. 이 파일은 특정 서비스 버전의 배포 설명자 역할을 합니다.
app.yaml 파일을 만들지 않으면 gcloud app deploy 명령어가 애플리케이션을 배포할 때 만들 수 있습니다.
App Engine이 만드는 app.yaml 파일에는 애플리케이션을 실행하는 데 필요한 설정만 포함되어 있습니다.
일반적으로 표준 환경에 있는 간단한 Java 앱의 경우 app.yaml 파일에 runtime 요소만 필요합니다. 예를 들면 다음과 같습니다.
runtime:java21
App Engine은 앱에서 사용할 수 있는 메모리와 CPU 리소스를 결정하는 F1 인스턴스 클래스와 새로운 앱 인스턴스가 생성되는 방법과 시기를 제어하는 자동 확장을 비롯한 다른 모든 설정의 기본값을 제공합니다.
기본 설정을 재정의해야 하는 경우 app.yaml 파일을 만들고 필요한 설정을 지정합니다. 자세한 내용은 app.yaml 파일 참조를 확인하세요.
app.yaml 파일에 고유한 이름을 지정할 수 있습니다. 하지만 이렇게 하면 배포 명령어에도 파일 이름을 지정해야 합니다. 예를 들어 app.yaml 파일의 이름을 service-name-app.yaml이나 app.standard.yaml로 지정한 후 다음 중 하나를 사용하여 앱을 배포해야 합니다.
앱에서 여러 서비스와 app.yaml 파일을 구조화하는 방법에 대한 자세한 내용은 웹 서비스 구조화를 참조하세요.
Maven 프로젝트의 경우 app.yaml 파일의 표준 위치는 src/main/appengine 디렉터리에 있습니다. App Engine Maven 플러그인은 JAR 아티팩트와 이 app.yaml 파일이 포함 된 올바른 target/appengine-staging 디렉터리를 만들어 배포를 준비합니다.
[[["이해하기 쉬움","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\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file is used to configure an App Engine app, including its runtime, handlers, scaling, and environment variables, and it acts as a deployment descriptor for a specific service version.\u003c/p\u003e\n"],["\u003cp\u003eIf an \u003ccode\u003eapp.yaml\u003c/code\u003e file is not created, the \u003ccode\u003egcloud app deploy\u003c/code\u003e command can automatically generate one containing the necessary settings for the application to run.\u003c/p\u003e\n"],["\u003cp\u003eFor simple Java apps in the standard environment, the \u003ccode\u003eapp.yaml\u003c/code\u003e file typically only requires the \u003ccode\u003eruntime\u003c/code\u003e element, as App Engine provides default values for other settings.\u003c/p\u003e\n"],["\u003cp\u003eYou can use a custom name for your \u003ccode\u003eapp.yaml\u003c/code\u003e file, but you must then specify this file name in the deployment command when using \u003ccode\u003egcloud app deploy\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIn a Maven project, the standard location for the \u003ccode\u003eapp.yaml\u003c/code\u003e file is within the \u003ccode\u003esrc/main/appengine\u003c/code\u003e directory, and if multiple JAR files or a custom entry point are required, you must define it within the \u003ccode\u003eentrypoint\u003c/code\u003e element of \u003ccode\u003eapp.yaml\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Defining runtime settings\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nAn App Engine app is configured using an `app.yaml`\nfile, that contains the runtime, handlers, scaling, and other general settings\nincluding environment variables.\n\n\nAbout `app.yaml` files\n----------------------\n\n\u003cbr /\u003e\n\nYou can specify the runtime configuration for your Java app, including versions and URLs, in the `app.yaml` file. This file acts as a deployment descriptor of a specific [service](/appengine/docs/standard/an-overview-of-app-engine) version.\n\n\u003cbr /\u003e\n\n\nIf you don't create an `app.yaml` file, the `gcloud app deploy` command can\n[create one when you deploy your\napplication](/appengine/docs/standard/testing-and-deploying-your-app#other_deployment_options).\nThe `app.yaml` file that App Engine creates contains only the settings\nthat are required to run your application.\n\n\nGenerally, your `app.yaml` file requires only the `runtime` element for a simple\nJava app in the standard environment, for\nexample:\n\n\n runtime: java21\n\n\nApp Engine provides default values for all other settings, including\nthe [F1 instance class](/appengine/docs/standard#instance_classes), which\ndetermines the memory and CPU resources that are available to your app, and\n[automatic scaling](/appengine/docs/standard/how-instances-are-managed#scaling_types),\nwhich controls how and when new instances of your app are created.\n\nIf you need to override the default settings, create an `app.yaml` file and\nspecify the settings you need. For more information, see\n[`app.yaml` file reference](/appengine/docs/standard/reference/app-yaml).\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/standard/testing-and-deploying-your-app)\nas well. For example, if you name your `app.yaml` file `service-name-app.yaml`\nor `app.standard.yaml`, then you must deploy your app using either: \n\n gcloud app deploy service-name-app.yaml\n gcloud app deploy app.standard.yaml\n\nTo learn more about structuring multiple services and `app.yaml` files in your app, see [Structuring web services](/appengine/docs/standard/configuration-files).\n\nFor a Maven project, the standard location for `app.yaml` file is under the\n`src/main/appengine` directory. The App Engine Maven plugin will\ncreate a correct `target/appengine-staging` directory containing your JAR\nartifacts and this `app.yaml` file, ready for deployment.\n\nThe following is a sample Maven project structure: \n\n MyDir/\n pom.xml\n [index.yaml]\n [cron.yaml]\n [dispatch.yaml]\n src/main/\n appengine/\n app.yaml\n java/com.example.mycode/\n MyCode.java\n\nIf you have more than one JAR file in your project directory or want to\nspecify a custom entrypoint, you must specify it in the `entrypoint` element of\nyour `app.yaml` file.\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/standard/reference/app-yaml)."]]