Skip to content

Conversation

@bryanchriswhite
Copy link
Contributor

Summary

This PR introduces Module 19: Containerization & Orchestration, the first module of Part V (Infrastructure & Operations). It provides comprehensive coverage of Docker, Docker Compose, and Kubernetes fundamentals, bridging the gap between local development and production deployment patterns.

Key Changes

  • New Module 19 (curriculum/part-5-infrastructure-and-operations/19-containerization-and-orchestration.md): A 1,100+ line deep dive covering:

    • The problem containers solve (environment consistency, "works on my machine")
    • Docker fundamentals: images, containers, Dockerfiles, registries
    • Multi-stage builds for optimized production images
    • Docker Compose for multi-container local development
    • Kubernetes primitives (Pod, Deployment, Service, Ingress, ConfigMap, StatefulSet)
    • The K8s-first development stack (kind, Tilt, k3s, Kustomize)
    • 5 hands-on exercises with solutions
    • Common troubleshooting issues
  • Part V Structure (curriculum/part-5-infrastructure-and-operations/README.md): New directory with roadmap for Modules 20-21 (Observability & Reliability, Infrastructure as Code)

  • Updated Part III (curriculum/part-3-building-applications/15-deployed-app.md): Added "What's Next" section linking to Module 19 for readers wanting deeper deployment control

  • Updated Curriculum Index (curriculum/README.md): Added Part V table with Module 19 marked complete, Modules 20-21 marked planned

  • Working Example (examples/19-chat-docker-compose/): Complete, runnable Docker Compose setup for the chat app with:

    • Production-ready Dockerfiles for Node.js backend and React frontend
    • Multi-stage frontend build
    • Full docker-compose.yml with frontend, backend, and PostgreSQL
    • Development overrides for live reload
    • Exercise suggestions

Notable Implementation Details

  • Practical focus: The module emphasizes Docker as the daily tool, with Kubernetes coverage sufficient for understanding vocabulary and making informed decisions rather than mastery
  • K8s-first argument: Presents a case for starting with Kubernetes (via kind + Tilt locally, k3s in production) rather than migrating later, with clear trade-offs
  • Layered learning: Progresses from "why containers exist" → Docker fundamentals → multi-container orchestration → Kubernetes awareness
  • Hands-on exercises: All 5 exercises are solvable with the module content; solutions provided
  • Real-world examples: Uses the chat app from Part III throughout, making the connection between earlier modules explicit

Alignment

This module completes the journey from "deploying to managed platforms" (Module 15) to "understanding the infrastructure patterns behind those platforms" (Module 19), setting up Part V's progression toward observability and infrastructure-as-code.

https://claude.ai/code/session_01G1ojUHAKE3Et2yHXsbMjXG

Add Module 19 covering Docker fundamentals, Docker Compose, Kubernetes
primitives, and the K8s-first development stack (kind, Tilt, k3s,
Kustomize). Includes practical examples for docker-compose and
kubernetes workflows, and stubs out Part V roadmap for future
observability and infrastructure-as-code modules.

- New curriculum Part V: Infrastructure & Operations
- Module 19 with 7 parts and 5 exercises
- Example 19: chat-docker-compose
- Example 20: chat-kubernetes (kind + Tilt)
- Updated Module 15 decision tree with container path
- Updated sidebars and curriculum README

https://claude.ai/code/session_01G1ojUHAKE3Et2yHXsbMjXG
@greptile-apps
Copy link

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

This PR introduces Module 19: Containerization & Orchestration as the first module of Part V (Infrastructure & Operations). The implementation is comprehensive, well-structured, and production-ready.

Key Additions:

  • 1,186-line curriculum module covering Docker fundamentals, Docker Compose, and Kubernetes primitives
  • Complete Docker Compose example (examples/19-chat-docker-compose/) with production-ready Dockerfiles, Traefik reverse proxy, and development overrides
  • Complete Kubernetes example (examples/20-chat-kubernetes/) with K8s manifests, Kustomize overlays, and Tilt configuration
  • Updated curriculum index and cross-references linking Module 15 to Module 19
  • CI/CD workflow updates to handle new example URL patterns

Technical Quality:

  • Dockerfiles follow best practices: multi-stage builds for frontend, proper layer caching, .dockerignore files
  • Docker Compose uses Traefik for path-based routing, health checks for database readiness, and proper depends_on configuration
  • K8s manifests correctly use StatefulSet for PostgreSQL (not Deployment), proper Service selectors, and Ingress routing
  • Database initialization includes retry logic to handle container startup race conditions
  • Kustomize structure properly separates base manifests from environment-specific overlays
  • Examples are fully functional and match the curriculum content

Pedagogical Approach:
The module takes a pragmatic stance, emphasizing Docker as the daily tool while providing K8s awareness-level coverage. It presents a "K8s-first" argument (kind + Tilt + k3s + Kustomize) with clear trade-offs, which is opinionated but well-reasoned and acknowledges when this approach is NOT appropriate.

Integration:
The PR properly integrates with existing curriculum structure, updates the main index, adds forward-looking references to planned Modules 20-21, and provides backward links from Module 15.

Confidence Score: 5/5

  • This PR is safe to merge with no blocking issues
  • All implementations follow Docker and Kubernetes best practices, examples are complete and functional, curriculum content is technically accurate, and the PR includes proper CI/CD updates for the new content
  • No files require special attention

Important Files Changed

Filename Overview
curriculum/part-5-infrastructure-and-operations/19-containerization-and-orchestration.md Comprehensive 1,186-line module covering Docker and Kubernetes fundamentals with exercises and practical examples
examples/19-chat-docker-compose/docker-compose.yml Complete Docker Compose setup with Traefik reverse proxy, frontend, backend, and PostgreSQL with proper health checks
examples/19-chat-docker-compose/client/Dockerfile Multi-stage build using Node for compilation and Caddy for serving, following best practices for production images
examples/19-chat-docker-compose/server/Dockerfile Optimized Node.js Dockerfile with proper layer caching and production-only dependencies
examples/20-chat-kubernetes/Tiltfile Tilt configuration using Kustomize for local K8s development with automatic rebuilds and port forwarding
examples/20-chat-kubernetes/k8s/base/backend-deployment.yaml K8s Deployment manifest for backend with proper label selectors and ConfigMap integration
examples/20-chat-kubernetes/k8s/base/postgres-statefulset.yaml StatefulSet with volumeClaimTemplates for persistent database storage, correctly using StatefulSet over Deployment
examples/19-chat-docker-compose/server/src/services/database.js Database initialization with retry logic to handle Docker Compose startup race conditions

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Curr as Curriculum
    participant Ex19 as Docker Compose Example
    participant Ex20 as K8s Example
    participant CI as CI/CD Workflows
    participant Web as Website Docs

    Dev->>Curr: Add Module 19 content (1,186 lines)
    Note over Curr: Covers Docker, Compose, K8s primitives,<br/>K8s-first development stack

    Dev->>Curr: Update Part V README
    Note over Curr: Roadmap for Modules 19-21

    Dev->>Curr: Update Module 15
    Note over Curr: Add "What's Next" link to Module 19

    Dev->>Curr: Update curriculum index
    Note over Curr: Add Part V with Module 19 complete

    Dev->>Ex19: Create Docker Compose example
    Ex19->>Ex19: Frontend Dockerfile (multi-stage)
    Ex19->>Ex19: Backend Dockerfile (Node.js)
    Ex19->>Ex19: docker-compose.yml with Traefik
    Ex19->>Ex19: docker-compose.override.yml for dev
    Ex19->>Ex19: Full chat app implementation

    Dev->>Ex20: Create Kubernetes example
    Ex20->>Ex20: K8s manifests (Deployment, Service, Ingress)
    Ex20->>Ex20: Kustomize base + overlays
    Ex20->>Ex20: Tiltfile for dev workflow
    Ex20->>Ex20: kind-config.yaml for local K8s
    Ex20->>Ex20: Full chat app implementation

    Dev->>CI: Update link check configs
    Note over CI: Add patterns for example URLs

    Dev->>Web: Sync curriculum to website
    Dev->>Web: Add example documentation pages
    Dev->>Web: Update sidebars with new content
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 16 to 30
```
19-chat-docker-compose/
├── client/
│ ├── Dockerfile # Multi-stage build: Node (build) → nginx (serve)
│ ├── .dockerignore
│ ├── nginx.conf # Custom nginx config for SPA routing
│ └── src/ # React application source
├── server/
│ ├── Dockerfile # Node.js production image
│ ├── .dockerignore
│ └── src/ # Express API source
├── docker-compose.yml # Production-like configuration
├── docker-compose.override.yml # Development overrides (live reload)
└── .env.example # Environment variable template
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that the actual implementation files (client/Dockerfile, server/Dockerfile, docker-compose.yml, source code) exist in the repository, as they're referenced throughout this README but not included in this PR.

Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/19-chat-docker-compose/README.md
Line: 16:30

Comment:
Check that the actual implementation files (`client/Dockerfile`, `server/Dockerfile`, `docker-compose.yml`, source code) exist in the repository, as they're referenced throughout this README but not included in this PR.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 13 to 39
## Structure

```
20-chat-kubernetes/
├── client/
│ ├── Dockerfile
│ └── src/
├── server/
│ ├── Dockerfile
│ └── src/
├── k8s/
│ ├── base/
│ │ ├── kustomization.yaml
│ │ ├── backend-deployment.yaml
│ │ ├── frontend-deployment.yaml
│ │ ├── postgres-statefulset.yaml
│ │ ├── services.yaml
│ │ ├── configmap.yaml
│ │ └── ingress.yaml
│ └── overlays/
│ ├── development/
│ │ └── kustomization.yaml
│ └── production/
│ └── kustomization.yaml
├── Tiltfile
└── kind-config.yaml
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify that the K8s manifests, Tiltfile, and kind-config.yaml exist in the repository, as they're documented here but not included in this PR.

Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/20-chat-kubernetes/README.md
Line: 13:39

Comment:
Verify that the K8s manifests, `Tiltfile`, and `kind-config.yaml` exist in the repository, as they're documented here but not included in this PR.

How can I resolve this? If you propose a fix, please make it concise.

Address Greptile review feedback on PR #13:

- Create full implementation for example 19 (Docker Compose): Express
  server with PostgreSQL, React client with Caddy, Traefik reverse
  proxy with Docker label-based routing, dev overrides
- Create full implementation for example 20 (Kubernetes): K8s manifests
  (Deployments, StatefulSet, Services, Ingress, ConfigMap), Kustomize
  overlays for dev/prod, Tiltfile, kind config, Traefik helm values
- Replace nginx with caddy:2-alpine for static file serving (simpler
  Caddyfile config with native SPA try_files support)
- Replace direct port exposure with Traefik reverse proxy for
  path-based routing (/api -> backend, / -> frontend)
- Create website doc pages for both new examples
- Update sidebar to include chat-docker-compose and chat-kubernetes
- Update both copies of the curriculum module (nginx -> caddy/traefik
  in multi-stage builds, Docker Compose, ingress controller, exercise 2)
- Rename social card image to match docusaurus.config.ts reference
  (docusaurus-social-card.jpg -> devfoundry-social-card.jpg)
- Filter out internal relative paths from linkinator broken link count
  (extensionless Docusaurus URLs like build/docs/overview can't be
  resolved from filesystem; Docusaurus validates these at build time)
- Skip dev.episkopos.community from external link check (self-referential
  og:image URL only resolves after deployment)
- Remove missing CONTRIBUTING.md from markdown link check file-path
- Fix GitHub repo URLs in new example doc pages (devfoundry -> Episk-pos)
… check

The deployed site returns 404 for curriculum category pages (e.g.
/docs/curriculum/part-1-foundations) which are linked from curriculum
README files. Also ignore http://api-server which appears in K8s
code examples and is not a real URL.
@bryanchriswhite
Copy link
Contributor Author

@greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@bryanchriswhite bryanchriswhite merged commit 75b3a3a into main Jan 29, 2026
2 checks passed
@bryanchriswhite bryanchriswhite deleted the claude/add-virtualization-module-3zpJU branch January 29, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants