- Python Django Tutorial for Beginners
- Deploy Your Script as a Flask App
- Google App Engine's config file (app.yaml)
- Integrate web app with Google Ads
- GCloud Python3 Runtime Environment
- Map your web app to a custom domain
- App Engine and Google Storage Sample
- Reading and writing to cloud storage
- Also describes how to inspect a bucket's content and how to delete files in cloud storage.
- Install the Google Cloud SDK:
$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
$ sudo apt update
$ sudo apt install google-cloud-cli
$ sudo apt install google-cloud-cli-app-engine-python
-
Setup up a Google App Engine account (here)
-
Create a new App Engine project from the Dashboard view.
-
Authenticate your project on your machine:
$ gcloud init
Execute anytime you want to update your app on the server:
$ cd /path/to/project (where the `app.yaml` file lives)
$ gcloud app deploy
Taken from this tutorial, follow these steps to activate the default Cloud Storage bucket for your app:
Click Create under Default Cloud Storage Bucket in the App Engine settings page for your project. Notice the name of this bucket: it is in the form <project-id>.appspot.com
.
NOTES:
- If you need more storage than the 5GB limit, you can increase this by enabling billing for your project, making this a paid bucket. You will be charged for storage over the 5GB limit.
- The App Engine services are enough if users will not be uploading files. Cloud storage is needed in order for the app to read/write files.
Follow these instructions to make sure that your app correctly handles the read/write functions.
The beginning of the linked tutorial asks you to create a new bucket and make it publicly readable:
$ gsutil mb gs://[YOUR_BUCKET_NAME]
$ gsutil defacl set public-read gs://[YOUR_BUCKET_NAME]
If you're making use of the Cloud Storage services, you'll need to authentica your account first. Taken from this tutorial, execute the following and follow the prompts to log into your Google account:
$ gcloud auth login
After login, you should see the page: You are now authenticated with the gcloud CLI!. There are several additional resources on the page that you can explore, or you can close the page and continue developing.
After authentication, define the current project by executing:
$ gcloud config set project [PROJECT_ID]
You should now have the green light to deploy your app (see above).
- To disable an app, go to the Settings tab in the cloud webpage.