Moving Beyond Single-Host Docker Compose
In local development and entry-level setups, deploying a multi-service web application often starts and ends with a single docker-compose.yml file running on a single virtual machine. While effective for prototyping, single-host hosting obscures real-world cloud infrastructure concerns: network boundaries, least-privilege security groups, zero-trust deployment pipelines, and isolated database subnets.
I built the Expense Tracker lab as a hands-on learning environment to bridge that gap. The goal was to build the infrastructure surrounding an application from scratch on AWS:
- Physical Network Segmentation: Provisioning a custom VPC with dedicated public, private application, and isolated database subnets across two availability zones (
ap-south-1aandap-south-1b). - Zero-SSH Administration: Completely closing inbound port 22 to the world, managing compute instances solely through the AWS Systems Manager (SSM) agent.
- Declarative Infrastructure as Code: Codifying every VPC route table, NAT Gateway, security group, and IAM policy in Terraform.
- Automated CI/CD Delivery: Automating Docker container builds with GitHub Actions, pushing images to Amazon ECR, and triggering remote deployments via SSM run commands.
- Configuration Management: Using Ansible with dynamic EC2 inventory plugins to configure Docker runtimes on Amazon Linux 2023 instances over SSM.