A to Z: Deploying a Flask App Online Using Google Cloud Run
1 min readAug 19, 2023
You built a cool app using Python and Flask, but deploying looks like another mountain of work? Don’t fret, here is a series of small, step by step documentation to deploy a Flask based web-app for very cheap.
This guide is intended as a detailed reminder for myself to save time in the future, and hopefully save time for others as well.
The tools and services we will use are:
- Gitlab
- Docker
- Google Cloud Run
- Google Cloud Artifact Registry
- A Domain service of your choice
Before deploying, you will require:
- An app built in Python/Flask
- A domain name (optional)
After those two things are acquired, we can get in the meat of things:
- Connect your local project to Gitlab
- Dockerize your Application
- Deploy the App on Google Cloud Run using Artifact Registry
- Map your Custom Domain to your Google Cloud Run service
- Using Gitlab to deploy your App to Google Cloud Run service directly (TBD)
Bonus:
- Clean virtual environment of undesired packages
- Setting up Google Cloud Account (??)