Skip to content

Instantly share code, notes, and snippets.

@mehdihasan
Created July 19, 2020 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehdihasan/a0a4d9d0d06c6d7ca0bd7001587da0ac to your computer and use it in GitHub Desktop.
Save mehdihasan/a0a4d9d0d06c6d7ca0bd7001587da0ac to your computer and use it in GitHub Desktop.
gcp-app-engine-deployment

How to deploy application in GCP: App Engine

Handy Commands

You can list the active account name with this command:

gcloud auth list

You can list the project ID with this command:

gcloud config list project

Deploy Application

clone the app:

git clone https://github.com/GoogleCloudPlatform/python-docs-samples

Deploy your Hello World application.

gcloud app deploy

This app deploy command uses the app.yaml file to identify project configuration.

Disable the application

App Engine offers no option to Undeploy an application. After an application is deployed, it remains deployed, although you could instead replace the application with a simple page that says something like "not in service."

However, you can disable the application, which causes it to no longer be accessible to users.

In the Cloud Console, on the Navigation menu (Navigation menu), click App Engine > Settings.

Click Disable application.

Read the dialog message. Enter the App ID and click DISABLE.

If you refresh the browser window you used to view to the application site, you'll get a 404 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment