Introduction
In the previous article , I showed how to build a production-ready Docker image for Laravel & Filament.
But in real-world applications, a single container is never enough.
Running a production application means dealing with multiple concerns:
web server
PHP runtime
database
cache
background workers
scheduled jobs
And this is where things usually start to get messy.
The problem with "simple" setups
Most Docker Compose examples look like this:
one container
maybe a database
everything else mixed together
It works.
Until it doesn’t.
From my experience, this approach quickly leads to:
poor observability
difficult debugging
no real scaling strategy
fragile deployments
A simple rule I follow
Over time, I ended up following one principle:
👉 one container = one responsibility
It sounds simple, but it completely changes how you design your architecture.
A production-oriented architecture
Instead of one container doing everything, I split responsibilities:
app → PHP-FPM…