REGION_ID는 앱을 만들 때 선택한 리전을 기준으로 Google에서 할당하는 축약된 코드입니다. 일부 리전 ID는 일반적으로 사용되는 국가 및 주/도 코드와 비슷하게 표시될 수 있지만 코드는 국가 또는 주/도와 일치하지 않습니다. 2020년 2월 이후에 생성된 앱의 경우 REGION_ID.r이 App Engine URL에 포함됩니다. 이 날짜 이전에 만든 기존 앱의 경우 URL에서 리전 ID는 선택사항입니다.
웹 서비스를 배포하려면 app.yaml 파일이 있는 프로젝트의 루트 디렉터리에서 gcloud app deploy 명령어를 실행합니다.
gcloudappdeploy
웹 서비스를 배포할 때마다 App Engine에 해당 앱의 새 버전이 생성됩니다. 배포하는 동안 Cloud Build 서비스를 사용하여 컨테이너 이미지를 만든 다음 App Engine에서 실행하기 전에 사본을 Google Cloud Storage에 업로드합니다.
App Engine에 배포하는 방법에 대한 자세한 내용은 앱 테스트 및 배포를 참조하세요.
서비스 보기
브라우저를 빠르게 시작하고 https://PROJECT_ID.REGION_ID.r.appspot.com에서 웹 서비스에 액세스하려면 다음 명령어를 사용합니다.
gcloudappbrowse
서비스 및 버전 관리
앞서 App Engine에 웹 서비스 버전을 배포했습니다. 코드 버전을 배포할 때마다 서비스에 해당 버전이 생성됩니다. App Engine에 초기 배포되는 버전은 default 서비스에서 만들어야 하지만 후속 배포되는 버전은 app.yaml 파일에 서비스 이름을 지정할 수 있습니다.
gcloud app deploy 명령어를 실행하고 해당 서비스에 새 버전을 배포하면 언제든지 서비스를 업데이트할 수 있습니다. 서비스를 업데이트할 때마다 마지막으로 배포된 버전으로 트래픽이 자동 라우팅됩니다. 그러나 gcloud 플래그를 포함하여 deploy 명령어 동작을 변경할 수 있습니다.
Google Cloud 콘솔을 사용하여 App Engine에 배포하는 서비스와 버전을 관리하고 확인합니다.
[[["이해하기 쉬움","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\u003eREGION_ID\u003c/code\u003e is a code assigned by Google based on the region selected during app creation, included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eYou can deploy your web service to App Engine using the \u003ccode\u003egcloud app deploy\u003c/code\u003e command, with each deployment creating a new version of your app.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud app browse\u003c/code\u003e command allows you to quickly access your deployed web service in a browser using a URL containing your \u003ccode\u003ePROJECT_ID\u003c/code\u003e and \u003ccode\u003eREGION_ID\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine manages multiple versions of your service, with the initial deployment in the \u003ccode\u003edefault\u003c/code\u003e service, and updates automatically routing traffic to the latest deployed version.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the Google Cloud console to view and manage your App Engine services and the different deployed versions.\u003c/p\u003e\n"]]],[],null,["# Deploy your web service\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/standard/python3/how-requests-are-routed#region-id). \nOK\n\n\u003cbr /\u003e\n\n| **Note:** If you are deploying a new Python web service to Google Cloud, we recommend getting started with [Cloud Run](/run/docs/quickstarts/build-and-deploy/deploy-python-service).\n\nUse the [Google Cloud CLI](/sdk/gcloud/reference/app) to\ndeploy your web service to App Engine.\n\nThough this initial version of the web service doesn't have\nFirestore in Datastore mode (Datastore) or Firebase authentication,\nyou can deploy it to App Engine at this stage to test and ensure that\nit works as expected.\n\nBefore you begin\n----------------\n\nIf you have completed all the previous steps in this guide, skip this section.\nOtherwise, complete one of the following:\n\n- Start from [Build a Python 3 App](/appengine/docs/standard/python3/building-app)\n and complete all the steps leading up to this one.\n\n- If you already have a\n [Google Cloud project](/appengine/docs/standard/python3/building-app/creating-gcp-project),\n you can continue by downloading a copy of the web service:\n\n 1. Download the sample application repository using\n [Git](https://git-scm.com/):\n\n git clone https://github.com/GoogleCloudPlatform/python-docs-samples\n\n Alternatively, you can [download the sample](https://github.com/GoogleCloudPlatform/python-docs-samples/archive/master.zip) as a zip\n file and then extract it.\n 2. Navigate to the directory that contains a copy of the files from the\n previous step:\n\n cd python-docs-samples/appengine/standard_python3/building-an-app/building-an-app-1\n\nDeploy your service\n-------------------\n\nTo deploy your web service, you run the\n[`gcloud app deploy`](/sdk/gcloud/reference/app/deploy) command from the root\ndirectory of your project, where your `app.yaml` file is located: \n\n gcloud app deploy\n\nEach time that you deploy your web service, a new\n[version](/appengine/docs/an-overview-of-app-engine) of that\napp is created in App Engine. During deployment, a container image is\ncreated using the [Cloud Build](/container-builder/docs) service, and\nthen a copy is uploaded to Google Cloud Storage before it is run in\nApp Engine.\n\nFor more information about deploying to App Engine, see\n[Testing and Deploying Your App](/appengine/docs/standard/testing-and-deploying-your-app).\n| **Note:** Files listed in your [`.gcloudignore`](/sdk/gcloud/reference/topic/gcloudignore) file are not uploaded to App Engine during deployment.\n\nViewing your service\n--------------------\n\nTo quickly launch your browser and access your web service at\n\n`https://`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003eREGION_ID\u003c/a\u003e\u003c/var\u003e`.r.appspot.com`, enter the following\ncommand: \n\n gcloud app browse\n\n| **Tip:** If you would like to change the URL of your web service to something other than the default `https://`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003eREGION_ID\u003c/a\u003e\u003c/var\u003e`.r.appspot.com` URL, you can [add a custom domain](/appengine/docs/standard/mapping-custom-domains).\n\nManaging services and versions\n------------------------------\n\nYou've just deployed a version of the web service to App Engine. Each\ntime that you deploy a version of your code, that version is created in a\nservice. The initial deployment to App Engine must be created in the\n`default` service, but for subsequent deployments, you can\n[specify the name of your service in your `app.yaml` file](/appengine/docs/standard/reference/app-yaml#service).\n\nYou can update a service at any time by running the\n`gcloud app deploy` command and deploying new versions to that service. Each\ntime that you update a service, traffic is automatically routed to the version\nlast deployed. However, you can include\n[`gcloud` flags](/sdk/gcloud/reference/app/deploy) to change the deploy command\nbehavior.\n\nUse the Google Cloud console to manage and view the services and versions that\nyou deploy to\nApp Engine:\n\n- Use the Google Cloud console to view your App Engine services:\n\n [Go to the services page](https://console.cloud.google.com/appengine/services)\n- Use the Google Cloud console to view your versions:\n\n [Go to the versions page](https://console.cloud.google.com/appengine/versions)\n\nFor more information about the multi-service design pattern, see\n[An Overview of App Engine](/appengine/docs/an-overview-of-app-engine).\nTo learn how to send requests to specific services and versions, see\n[Splitting Traffic](/appengine/docs/standard/splitting-traffic).\n\nNext steps\n----------\n\nNow that you have a Python service running on App Engine,\nyou're ready to learn how to handle data with Datastore."]]