The Challenge
I was given a multi-service application with:
A Node.js frontend
A FastAPI backend
A Python worker
Redis as a queue
The catch?
It was intentionally broken.
My task wasn’t to build it was to:
Fix it
Containerize it
Ship it with a full CI/CD pipeline
Step 1: Debugging the System
Before touching Docker, I read the entire codebase.
Issues I found:
Hardcoded localhost breaking container networking
Missing environment variables
Redis connection failures
API crashing on startup
Frontend calling wrong endpoints
Fix approach:
Replaced hardcoded values with env variables
Standardized service communication (api, redis)
Added proper error handling
Step 2: Containerization
Each service got its own Dockerfile.
Key decisions:
Used python:3.11-alpine for minimal size
Created non-root users (appuser)
Added HEALTHCHECK to every service
Avoided copying .env files into images
Step 3: Docker Compose Setup
This was where things got interesting.
What I implemented:
Internal bridge…