Learn to build and deploy a Serverless Django application to Google Cloud Run with Cloud SQL, Cloud Build, & Docker.
-
Python XP -> found here
-
Django XP -> found here
-
Google SDK & CLI Installed via This guide Guide
1. Clone
git clone https://github.com/codingforentrepreneurs/Serverless-Django .
2. Create Virtual Environment
cd supercharged
python3.8 -m venv .
Use Any version of Python >= 3.6
3. Activate virtual environment Mac/Linux
source bin/activate
Windows:
.\Scripts\activate
If using pipenv, run
pipenv shell
&&pipenv install
4. Install requirements
pip install -r requirements.txt
5. Run locally Mac/Linux
chmod +x ./scripts/local.sh
./scripts/local.sh
Windows
.\scripts\local.ps1
3 - Virtual Environment with Pipenv & VSCode Workspace
4 - Staging Django for Production
5 - Home Page View including Settings Variables
6 - WSGI with Gurnicorn or Waitress
8 - Install the Cloud SQL Proxy
9 - Database Service Account directory holder
10 - Run Cloud SQL Proxy with Service Account
11 - Connect Django & Proxy Database
12 - Dockerfile, Docker Build, & Docker Run
13 - Docker Build & Push To GCloud Container Registry
16 - Make Changes, Build, & Deploy