Your Cart
Loading

PROD STACK GUIDE ยท 2027 EDITION

From git push to Production

The path from your first commit to a live, secure deployment: every tool in the right order, plus the must-haves a modern production setup needs in 2027.

Beginner-friendlyTool by toolVideo tutorials
โœ“ testโœ“ buildโœ“ deploy a3f9c2e 7be41d0 c91d5aa git pushproduction โœ“
Start here

Watch the intro: how code really reaches production

Intro video
The Big Picture

Getting code to production is not one skill.

It is a chain of five small, boring, repeatable steps:

Git

Git is the single source of truth for your code.

Docker

Docker packages your app so it runs the same everywhere.

Terraform / OpenTofu

Terraform / OpenTofu creates the servers, networks and databases your app runs on, from code.

CI/CD

CI/CD connects all of it: every push is tested, built, and deployed automatically.

Production

Production is where real users are. It needs secrets, monitoring, backups and a way to roll back.

โ˜•

The goal is simple: a deploy should be a non-event. You merge a pull request, the pipeline does the rest, and you go get coffee.

The roadmap

Learn it in this order

Open a step, watch the tutorial or read the official docs, then move to the next one. Each tool builds on the one before it.

Step 01 ยท Version controlGitYour code's full history, and the single source of truth. Tap to open โ†“โ–ถ Video tutorial+
Git tutorial

What it is. Version control: a full history of every change, who made it, and why.

Core concepts
CommitA saved snapshot with a message. Small and focused beats big and vague.
BranchAn isolated line of work. Create one per feature or fix.
Pull requestA proposal to merge a branch. This is where review and automated checks happen.
Merge vs. rebaseMerge keeps history as it happened, rebase makes it linear. Pick one convention per team.
TagA named point in history (like v1.4.0) that marks a release.
Must-haves for 2027
  • Trunk-based development. Short-lived branches merged into main often, not long-running branches that diverge for weeks.
  • Protected main. No direct pushes. Require a PR, passing checks and at least one review.
  • Everything lives in Git. Application code, Dockerfiles, Terraform files, pipeline definitions. If it is not in Git, it does not exist.
  • Secrets never enter Git. Add a proper .gitignore, turn on secret scanning (push protection), and assume anything committed once is compromised forever.
  • Signed commits are worth enabling once your team grows: they prove who actually wrote the code.
โš  Common mistake

Committing .env files "just for now". Rotate any secret that ever touched a repo, even a private one.

Step 02 ยท ContainersDockerPack your app into one box that runs the same everywhere. Tap to open โ†“โ–ถ Video tutorial+
Docker tutorial

What it is. A way to bundle your app and everything it needs into an image, which runs as a container.

Core concepts
Image vs. containerThe image is the frozen package, the container is a running instance of it.
DockerfileThe instructions that build the image, step by step.
Layers and cacheEach instruction is a layer. Put rarely-changing things (dependencies) before often-changing ones (your code) to keep builds fast.
RegistryWhere images are stored and pulled from: Docker Hub, GitHub Container Registry, AWS ECR and others.
Docker ComposeRuns several containers locally (app + database + cache) with one command. Great for development, not a production orchestrator.
Must-haves for 2027
  • Multi-stage build. Build in one stage, copy only the result into a small final stage. Smaller image, smaller attack surface.
  • Run as a non-root user.
  • Minimal base image. Slim or Alpine variants, distroless images, or Docker Hardened Images (free and open source under Apache 2.0 since late 2025).
  • A .dockerignore so .git, node_modules and .env never end up inside the image.
  • Tag immutably. Tag images with the Git commit SHA. Never rely on latest in production.
  • Scan in CI. Docker Scout, Trivy or Grype, and fail the build on critical findings.
โš  Common mistake

Baking secrets or environment-specific config into the image. The image must be identical in staging and production. Only the config injected at runtime differs.

Step 03 ยท Infrastructure as codeTerraform / OpenTofuCreate servers, networks and databases from code, not clicks. Tap to open โ†“โ–ถ Video tutorial+
Terraform tutorial

What it is. You describe your infrastructure (servers, networks, databases, DNS) in code. The tool compares that description to reality and makes the changes needed. No more clicking around a cloud console.

Core concepts
DeclarativeYou say what you want, not the steps to get there.
ProviderThe plugin that talks to a platform: AWS, Google Cloud, Azure, Cloudflare, Hetzner and many more.
ResourceOne piece of infrastructure: a server, a bucket, a DNS record.
Variables and outputsInputs that make code reusable, and values you want back (like a server IP).
ModulesReusable bundles of resources. Write plain resources first, extract modules when you see real repetition.
StateThe file that records what was created. The tool's memory, and the most sensitive and fragile part of the setup.
The workflowinit โ†’ plan (preview the changes) โ†’ apply (make them).
Terraform

The original HashiCorp tool, under the Business Source License since 2023. Choose it if your company or tooling already standardizes on it.

OpenTofu

The open-source fork (Linux Foundation / CNCF, MPL license) with native state encryption. Same HCL language, same workflow.

For a beginner the concepts are identical. Pick one, learn it well, and you can switch in an afternoon.

Must-haves for 2027
  • Remote state with locking. Never keep state only on your laptop. Recent versions support native locking on S3 without a separate lock table.
  • Encrypt state at rest. State can contain secrets in plain text.
  • Review the plan. Post the plan output in every PR. Reading the plan is your safety net.
  • Separate environments. Staging and production get separate state and separate cloud accounts or projects.
  • Pin versions of the tool and providers so a surprise upgrade does not change your infrastructure.
  • Detect drift. If someone changes something by hand in the console, code and reality disagree. Run a scheduled plan to catch it.
โš  Common mistake

Running apply from a laptop against production. Production changes should only come from the pipeline, after review.

Step 04 ยท AutomationCI/CDA robot that tests, builds and ships your code on every push. Tap to open โ†“๐Ÿ“– Official docs+
Official documentationGitHub Actions
Video tutorial coming soon

What it is. CI (Continuous Integration): every push is automatically built and tested. CD (Continuous Delivery / Deployment): passing builds are automatically released.

A typical pipeline
1Test2Scan3Build4Push5Plan6Deploy
The principle that matters most

Build once, promote the same artifact. The exact image that passed tests in staging is the one that goes to production. You never rebuild for production.

Must-haves for 2027
  • No long-lived cloud keys. Use OIDC (workload identity federation): the pipeline proves its identity and receives short-lived credentials that expire when the run ends. Lock the cloud role's trust policy to your repository and branch or environment.
  • Least-privilege permissions. Start every workflow read-only and grant more only where needed.
  • Pin third-party actions to a full commit SHA, not a floating tag. Supply-chain attacks on CI are now a primary attack surface.
  • Protected environments. Production deploys require approval and can only run from main.
  • Concurrency control. Never let two deploys to the same environment run at once.
  • Automated dependency updates (Dependabot or Renovate), so you are not running year-old packages.
โš  Common mistake

A pipeline that only runs tests, while someone still SSHes into a server to deploy by hand.

Step 05 ยท Going liveProductionSecrets, monitoring, backups and a way to roll back. Tap to open โ†“๐Ÿ“– Official docs+
Official documentationOpenTelemetry ยท The Twelve-Factor App
Video tutorial coming soon

What it is. Production is where real users are. Getting there safely means a runtime to run on, secrets kept out of code, eyes on what is happening, and a way back when a release goes wrong.

What production needs
A runtimeWhere the container actually runs. See your options โ†“
Secrets and configKept in a secrets manager, injected at runtime. See the rules โ†“
ObservabilityHealth checks, logs, metrics, alerts. See the basics โ†“
Release safetyRollbacks, safe migrations, feature flags. See the habits โ†“
โš  Common mistake

Treating "it runs" as "it is production-ready". It is only ready when you can rebuild it, see it, recover it and trust it.

Where your app runs

Pick the simplest runtime that fits

You have an image and infrastructure. Now choose where it runs.

01

One VPS + Docker Compose

Good for: Side projects, early products, learning

Trade-off: You own patching and uptime.

02

Managed container platform

Good for: Most real products

Trade-off: Less control, a bit more cost.

AWS ECS / Fargate ยท Google Cloud Run ยท Azure Container Apps ยท Fly.io
03

Kubernetes

Good for: Many services, large teams, special scaling needs

Trade-off: Real operational complexity.

Honest advice: most products never need Kubernetes. Start boring. Move up only when you can name the specific problem the simpler option cannot solve.

Every runtime also needsDNS and a domainHTTPS, no exceptionsReverse proxy or load balancer (Caddy, Nginx, Traefik, cloud)A managed database
Production must-haves ยท 2027

Six habits that keep production boring

Day-one practices for secrets, visibility, releases, security, recovery and cost. None of them are optional.

๐Ÿ”

Secrets and config

  • Config comes from the environment, not from the code or the image.
  • Secrets live in a secrets manager (AWS Secrets Manager / SSM, Google Secret Manager, Azure Key Vault, Doppler, 1Password), not in files, chat or Git.
  • Separate secrets per environment: the staging database password must differ from production.
  • Rotate regularly, and immediately after any suspected leak.
  • Give each service only the secrets it needs.
๐Ÿ‘

Observability

  • Health checks: a /health endpoint your platform checks, so unhealthy instances are replaced automatically.
  • Structured logs sent to one searchable place, not trapped on a server.
  • Metrics: error rate, latency, CPU and memory, request volume.
  • Uptime monitoring from outside your infrastructure, plus error tracking such as Sentry.
  • Alert on symptoms users feel (errors, slowness, downtime), not on every internal blip.
๐Ÿšฆ

Release safety

  • A rollback plan: images tagged by commit SHA mean rolling back is redeploying the previous tag. Practice it.
  • Pick a strategy: rolling, blue/green or canary.
  • Database migrations are the dangerous part. Use expand and contract: add backward-compatible structure first, remove the old one later.
  • Feature flags separate deploy from release.
  • A staging environment that mirrors production.
๐Ÿ›ก

Security

  • MFA on everything: cloud account, GitHub, registry, domain registrar.
  • Least-privilege IAM. No shared admin keys, no wildcard permissions.
  • Databases and internal services stay on private networks.
  • Keep everything patched: base images, dependencies, the OS if you run servers.
  • HTTPS everywhere, with free automatic certificates.
๐Ÿ’พ

Backups and recovery

  • Backups you have actually restored. An untested backup is only a hope.
  • RPO (Recovery Point Objective): how much data can you afford to lose?
  • RTO (Recovery Time Objective): how long can you stay down?
  • Choose backup frequency and recovery steps from those two numbers.
  • Prefer a managed database over running your own in a container.
๐Ÿ’ธ

Cost

  • Set a budget alert on day one. A forgotten resource can produce a surprise bill fast.
  • Tag resources so you know what belongs to what.
  • Destroy what you do not use. Infrastructure as code makes cleaning up (and rebuilding) cheap.
  • Pick resource sizes from real usage and review costs regularly.
The Golden Path

What a release looks like, end to end

Put everything together and one merge takes your code all the way to users.

1

Open a branch and write code. Small, focused changes.

2

Open a pull request. CI runs tests, scans, and shows the infrastructure plan.

3

A teammate reviews and approves. Review is part of the system.

4

Merge to main. The only trigger for a release.

5

The pipeline builds the Docker image, tags it with the commit SHA and pushes it to the registry.

6

It deploys to staging and runs smoke tests.

7

After approval it promotes the same image to production, using short-lived OIDC credentials.

8

Monitoring confirms the release is healthy. If not, roll back to the previous tag.

No SSH.No manual edits.No secrets pasted in chat.That is the Prod Stack.
Pro tips for 2027

The rules experienced teams swear by

01

The pipeline is the only door to production. A "quick fix in the console" creates drift that will bite you later.

02

Zero long-lived credentials. OIDC for CI to cloud, short-lived tokens wherever the platform offers them.

03

Treat your CI like production. Pin actions to SHAs, restrict who can trigger deploys, review workflow changes like app code.

04

AI makes code cheaper, so guardrails matter more. Tests, CI checks, scanning and review keep bad changes out. Never ship code you cannot explain.

05

Build once, promote the same image digest. Rebuilding per environment is how "it worked in staging" happens.

06

Start with the boring runtime. One VPS or a managed container service carries you very far. Add complexity only for a named problem.

07

Read every plan. Most infrastructure disasters are a destroy-and-recreate nobody noticed.

08

Automate dependency updates and keep the pipeline fast. A slow pipeline gets bypassed.

09

Write a one-page runbook: how to deploy, how to roll back, who to call, where the dashboards and logs are.

10

Test your restore, not just your backup, and rehearse a rollback while nothing is on fire.

11

Budget alerts and MFA before anything else. Ten minutes, and they prevent the two most expensive beginner mistakes.

Production readiness checklist

How close is your app to production?

Tick what you already have. Do not aim for a perfect enterprise setup on day one: start with the essentials, verify they work, and improve as you grow.

Code and Git

Docker and application

Infrastructure

CI/CD

Operations and security

Quick glossary

Terms you will meet on the way

ArtifactThe built output of your pipeline (here, a Docker image).
CI/CDAutomated testing, building and delivery.
DriftReal infrastructure no longer matches your code.
IaCInfrastructure managed through versioned code files.
Immutable tagAn image tag (like a commit SHA) that always points to the same build.
OIDCLets your pipeline prove its identity and get short-lived credentials instead of permanent keys.
RegistryA place where container images are stored.
RollbackReturning to a previous working version.
RPO / RTOAcceptable data loss / target time to restore service.
Smoke testA quick check after deploy that the basics work.
StateTerraform / OpenTofu's record of what it has created.
ObservabilityUnderstanding behavior through logs, metrics and traces.
Your next step ยท The course

You have the map. Now build the real system.

Git Push to Prod takes you from an empty repo to a live AWS deployment with Docker, Terraform and CI/CD, by building one complete, real system instead of isolated demos.

AWSDockerTerraformCI/CD
๐Ÿ”ฅ Promo code ยท 30% off
$397$277.90YOU SAVE $119.10
Enter codePRODat checkout
See the course โ†’one-time payment ยท 5-day refund window
Git Push to Prod course cover: AWS deployment with Docker, Terraform and CI/CD
PROD STACK GUIDE ยท 2027 EDITION