Serverless Docker-based Python Application on Google Cloud
What you'll learn
- Deploying a Serverless Docker-based Python Web Application
- Setup the Google Cloud Command Line tool on your system
- Build and run Docker containers Locally
- Web Application Deployment to Google Cloud
- Learn what Serverless Apps app
- Deploy to Cloud Run on Google Cloud Platform
- Build a Docker Container for Python apps
- Learn and understand Docker Containers and Why they're useful
- Learn CI/CD Practices with GitHub
- Leverage GitHub Actions to automate testing, building, and pushing containers
- Use GitHub Actions workflows to manage Google Cloud projects
- Implement Google Secret manager and use GitHub as our single source of truth
- Learn various Docker and Dockerfile Debugging Techniques.
- Python is recommended (as in the first 15 days of 30 Days of Python)
- Web Application Development (Like our Try Django series)
- A willingness to push through the tough parts because the other side is worth it.
Deploy a Serverless Python Application with Docker Containers and Google Cloud Run.
Running our apps on managed serverless architectures allows us to focus on our code and deploy more without worrying about the underlying infrastructure. What's better, our serverless applications only cost us money when they're used this is because serverless apps can scale to 0 running instances or scale up as needed.
Serverless is great for testing all kinds of app ideas as well as testing various stages of a stable app. Cloud Run is a managed service that unlocks serverless apps for your projects on Google Cloud. It's how we run this website exactly.
Cloud Run is a managed Knative offering that runs on Kubernetes so if you're interested in deploying a self-managed Knative service, consider watching my course Try Knative.
Here's what we're going to learn in this course:
Creating a basic FastAPI web app (in Python)
Implement python-decouple to manage environment variables in FastAPI
Writing a basic automated test to ensure our app is working as needed
Prepare and learn about a Dockerfile before building a container
Building a Docker container locally
Running a custom Docker image (container) locally
Push our code to GitHub
Leverage GitHub Actions to perform CI/CD workflows
Using Github Actions to build and push our Docker container to Google Cloud
Use Google Cloud Secrets manager within our Python app
Update Secrets in Github Actions as needed
Deploy our app continuously on Google Cloud Run
Course was completely revamped and released on Feb 15th, 2023
Who this course is for:
- Students with some Python Experience
- Beginner web app developers with an interest in Serverless applications
- AWS Lambda users looking to unlock the power of Container-based Serverless Apps
- Anyone looking to learn more about Docker Containers and/or Serverless applications
- Web developers looking to adopt Google Cloud to run various aspects of their apps
- Anyone interested in Knative or Kubernetes but want to start somewhere a little less challenging
- DevOps engineers looking to better understand CI/CD with Google Cloud through GitHub Actions
It all started with an idea. I wanted freedom... badly. Freedom from work, freedom from boredom, and, most of all, the freedom to choose. This simple idea grew to define me; it made me become an entrepreneur.
As I strived to gain freedom, overtime I realized that with everything that you do you can either (1) convince someone, somehow, to do it with you or (2) figure out how to do it yourself.
Due to a lack of financial resources (and probably the ability to convince people to do high quality work for free), I decided to learn. Then learn some more. Then some more. My path of learning website design started a long time ago. And yes, it was out of need not desire. I believed I needed a website for a company that I started. So I learned how to do it. The company died, my skills lived on... and got better and better.
It took me a while after learning web design (html/css) to actually start learning programming (web application, storing "data", user logins, etc). I tinkered with Wordpress, believing it could be a "user" site, but I was mistaken. Sure there are/were hacks for that, but they were hacks/work-arounds and simply not-what-wordpress-was-indended-to-be. Wordpress is for blogs/content. Plain and simple.
I wanted more. I had a web application idea that I thought would change the way restaurants hire their service staff. I tested it with my basic html/css skills, had great initial results, and found a technical (programmer) cofounder as a result. He was awesome. We were featured on CNN. Things looked great.
Until... cash-flow was a no-flow. Business? I think not. More like an avid hobby. We had the idea for a business just no business. Naturally, my partner had to find a means of income so I was left with the idea on its own.
Then, I tried Python. I was hooked. It was so easy. So simple. So elegant.
Then, I tried Django. Even more hooked. Made from python & made for web applications. It powers Instagram & Pinterest (two of the hottest web apps right now?).
Then, I tried Bootstrap. Simple and easy front-end design (html & css) that is super easy to use, mobile-ready, and overall... incredible.
Python, Django, and Bootstrap are truly changing the way the world builds web applications. I believe it's because of the simplicity to learn, the sheer power behind them, and, most of all, the plethora of resources to aid anyone in building their web projects (from packages to tutorials to q&a sites).
I relaunched my original venture with my new found skills. That wasn't enough. It didn't compel me as it once had. I started imagining all the possibilities of all the ideas I've always wanted to implement. Now I could. Which one to start with? There were so many good ideas...
Then another idea, a new & fresh idea, started brewing. I started to believe in the power of learning these skills. What would it mean if other non-technical entrepreneurs could learn? What would it mean if ideas were executed quickly, revenue models proven, all prior to approaching the highly sought-after programmers? What would it mean if entrepreneurs became coders?
And so. Coding for Entrepreneurs was born.
Here are some bio highlights:
Adjunct Professor of Entrepreneurship at the Lloyd Greif Center for Entrepreneurial Studies in the Marshall School of Business at the University of Southern California
Bestselling instructor on Udemy
Funded creator on Kickstarter
Founder of Coding For Entrepreneurs
Cohost of Backer Radio