Week 5 ‐ Docker Lamp Stack - AlanK23/Sec-350-01 GitHub Wiki
Docker Compose LAMP Stack
docker-compose.yml with MySQL, PHP/Apache, volumes, networking, and working curl test
Teraform Provider and Resources
main.tf with kreuzwerker/docker provider, docker_network, docker_volume, docker_image, docker_container resources
Variables and Student Isolation
variables.tf with student_name validation, web_port, mysql credentials; terraform.tfvars with personal settings
Scaling with count
web container uses count parameter; web_count variable controls container count; ports scale with count.index
Deployment and Verification
terraform init/plan/apply succeeds; all containers running; curl returns success; terraform destroy cleans up
GitHub Push
lamp-stack-terraform/ pushed to GitHub with .gitignore excluding .terraform/ and terraform.tfvars
- done
POST LAB CHANGES
I reenabled apparmor with: sudo status enable apparmor