App Engine 앱은 CPU, 메모리, 네트워크 및 디스크 리소스, 확장, 환경 변수를 비롯한 기타 일반 설정이 포함된 app.yaml 파일을 사용하여 구성됩니다.
app.yaml 파일 정보
버전과 URL이 포함된 Python 앱의 런타임 구성을 app.yaml 파일에 지정할 수 있습니다. 이 파일은 특정 서비스 버전의 배포 설명자 역할을 합니다.
추가 서비스를 위해 app.yaml 파일을 만들고 배포하려면 먼저 앱의 default 서비스에 대한 app.yaml 파일을 만들어야 합니다.
다음 app.yaml은 최신 버전의 Python을 사용하도록 앱을 구성하는 방법을 보여줍니다. 다른 지원되는 버전의 Python을 사용하려면 app.yaml 파일을 업데이트해야 합니다. 자세한 내용은 Python 런타임을 참조하세요.
# Copyright 2021 Google LLC## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.runtime:pythonenv:flexentrypoint:gunicorn -b :$PORT main:appruntime_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/python/configuring-your-app-with-app-yamlmanual_scaling:instances:1resources:cpu:1memory_gb:0.5disk_size_gb:10
앱 서비스의 복잡성에 따라 해당 app.yaml 파일에 몇 가지 요소만 정의해야 할 수 있습니다. 다음 예에서는 가변형 환경에서 Python 앱이 얼마나 간단한지 확인할 수 있습니다.
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-03-26(UTC)"],[[["App Engine apps are configured using an `app.yaml` file, which defines CPU, memory, network, disk resources, scaling, environment variables, and general settings."],["The `app.yaml` file specifies the runtime configuration for a Python app, including versions and URLs, and it serves as a deployment descriptor for a specific service version."],["You must create an `app.yaml` file for the `default` service before creating and deploying `app.yaml` files for additional services."],["The `app.yaml` file can be named uniquely, but the file name must then be specified with the deployment command, such as `gcloud app deploy service-name-app.yaml`."],["Some Python runtimes have reached their end of support, so it's recommended to upgrade your app to use the latest version of Python in the `app.yaml` file."]]],[]]