Files
laboratori-cloud/labs/lab-05-database/docker-compose.yml
Luca Sacchi Ricciardi 62723a01cb feat(06-03): create infrastructure for Lab 05 Database & RDS
Infrastructure:
- docker-compose.yml: PostgreSQL in private network (RDS simulation)
- Dockerfile: Alpine-based test image with postgresql-client

Services:
- app: nginx for testing database connection (multi-homed)
- db: PostgreSQL 16 in private network (simulates RDS)
- test-public: Alpine for isolation testing

Key Features:
- Private network with --internal flag (INF-02 compliant)
- Named volume for data persistence (INF-04)
- Resource limits: 2 vCPU, 4GB RAM (INF-03)
- Non-root execution (INF-01)
- NO ports exposed from database

Parallels:
- PostgreSQL container → RDS Instance
- Private network → VPC Private Subnet
- Named volume → EBS volume
- Resource limits → DB instance class

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 17:40:15 +02:00

2.5 KiB