Everything you need before your first production deployment โ version control, containers, networking, and Google Cloud.
Writing code is only the beginning. Getting it running reliably โ for real users, on real servers โ requires a short but critical sequence.
Git is the tool on your computer. GitHub is the website that stores your code online. They are not the same thing.
| Term | Think of it asโฆ | What it actually does |
|---|---|---|
| repository | A project folder with superpowers | Tracks every change ever made to every file inside it |
| commit | A save point with a sticky note | Snapshots your changes and records what you did and why |
| branch | A parallel universe to experiment in | Work on features without touching the "official" code |
| push | Upload to GitHub | Sends your local commits to GitHub so others can see them |
| pull | Download the latest version | Gets teammates' newest commits from GitHub to your machine |
| pull request | A proposal + code review | Asks the team to review & approve your branch before merging |
| merge | Accept and combine changes | Folds your approved branch back into the main codebase |
mainmain is your live, deployed app. Always create a new branch, get it reviewed, then merge. Committing directly to main is like editing a document thousands of people are reading in real time.
git add) is like putting items in a box. Committing (git commit) is sealing the box and labelling it clearly.A commit message is a note to your future self โ and every developer who comes after you. Write accordingly.
.env files ยท large binary files ยท compiled artifacts (node_modules/, __pycache__/, dist/)..gitignore file the moment you initialise a repository.
A container bundles your code, runtime, libraries, and config into one portable unit โ running identically on every machine and every cloud.
| Term | Analogy | Meaning |
|---|---|---|
| Dockerfile | A recipe | Instructions for building an image |
| Image | A pre-baked cake | The built, immutable artifact โ ready to run |
| Container | The cake being served | A running instance of an image |
| Artifact Registry | A secure bakery shelf | GCP's private storage for your Docker images |
:latest makes it impossible to track which version is deployed.
Most real apps aren't a single container โ they're a web server, an API, and a database running together. Docker Compose defines and starts all of them with one command.
docker run three times and manually wiring containers together, you describe your entire app stack in a single docker-compose.yml file. Compose handles the networking automatically.
All defined in: docker-compose.yml
services is a container. Compose wires them together on a shared private network automatically โ they reference each other by service name.| Context | Use Compose? | GCP equivalent |
|---|---|---|
| Local development | โ Yes | โ |
| Single-server staging | โ ๏ธ Possible | Compute Engine + Compose |
| Production (scaled) | โ No | Cloud Run or GKE |
.env file locally (and add it to .gitignore). In production, always use GCP Secret Manager โ never hardcode credentials in any config file.
Your app runs in the cloud, but users reach it through a web of networks, ports, and addresses. Here's the minimum you need to understand.
| Concept | What it is | Why it matters |
|---|---|---|
| IP Address | A server's numeric address e.g. 34.102.12.45 | How machines find each other on a network |
| Port | A numbered "door" on a server e.g. :8080 | One server runs many services โ ports tell traffic where to go |
| DNS | Translates myapp.com into an IP address | Humans use names; machines use numbers. DNS bridges them. |
| HTTP / HTTPS | The protocol browsers use to request pages | HTTPS is encrypted. Always use HTTPS in production. |
| Firewall | Rules that allow or block traffic to your server | Prevents unauthorised access โ only open ports you need |
| VPC | A private network inside GCP for your team only | Your databases and internal services are hidden from the public internet |
| Load Balancer | Distributes traffic across multiple servers | Prevents any one server from being overwhelmed; enables scaling |
:80 HTTP ยท :443 HTTPS ยท :5432 PostgreSQL ยท :3306 MySQL ยท :6379 Redis ยท :8080 app default:8080. GCP's load balancer handles the public :443 and forwards traffic to it automatically.
:5432) to the entire internet (0.0.0.0/0) in firewall rules. Databases must never be publicly accessible โ keep them inside your VPC.
GCP has hundreds of services. Here are the eight you will actually use deploying your first application.
| Service | Category | What it does | Start here ifโฆ |
|---|---|---|---|
| Cloud Run | Compute | Runs your Docker container without managing servers. Scales to zero when idle. | Building a web app or API โ |
| GKE | Compute | Kubernetes cluster for many containers at scale. | Multiple services, complex scaling |
| Artifact Registry | Storage | Private storage for your Docker images inside GCP. | Any Docker-based deploy |
| Cloud SQL | Database | Managed PostgreSQL / MySQL. No server admin required. | App needs a relational DB |
| Cloud Build | CI/CD | Runs build, test, and deploy pipelines on every push. | Automating GCP deployments |
| Cloud Load Balancing | Networking | Routes HTTPS traffic to containers. Handles TLS certificates. | Custom domains, high availability |
| Secret Manager | Security | Stores API keys and passwords securely in GCP. | Any app with secrets โ all apps |
| Cloud Logging | Observability | Aggregates logs from all services in one place. | Debugging production issues |
main merges that passed staging.Linters analyse your code automatically โ catching bugs, enforcing style, and flagging security issues before a single line reaches your teammates or your cloud.
pyproject.toml.S ruleset flags common security issues โ hardcoded passwords, use of eval(), unsafe deserialization. It is not enabled by default. Add "S" to your select list in pyproject.toml.
biome.json and runs significantly faster than the tools it replaces.npx biome ci . (not check) in pipelines โ it exits with a non-zero code on any issue, which tells GitHub Actions to fail the build. The check command is for local use.
Continuous Integration runs automated checks on every push. Continuous Deployment ships to GCP automatically when all checks pass. You focus on writing code.
GCP's native CI/CD tool is Cloud Build. It reads a cloudbuild.yaml file in your repository and triggers automatically on every push to main.
Run through this before every deployment. Click each item to check it off.
git status shows nothing pendingmainmain.env files, API keys, or passwords in the commit history.gitignore excludes __pycache__/, venv/, build artifactsdocker build . completes without errors:latest:80 and :443ruff check . passes with no errors (Python projects)npx biome ci . passes with no errors (JS/TS projects)200 OK after deploymentYou've covered the full journey from code to cloud. The next step is learning how to work effectively with AI tools as part of your development workflow.