← Back to generator
Guides
Practical, no-fluff explanations of the Docker Compose concepts that come up when building a PHP development environment.
Docker Compose vs Dockerfile: What's the Difference?
A Dockerfile builds one image. Compose orchestrates multiple containers. Here's when you need one, the other, or both.
How to Connect PHP to Redis with Docker Compose
Add a Redis service to Docker Compose and connect to it from plain PHP, Symfony, and Laravel — with working code and the connection-refused gotcha explained.
Docker Compose Healthchecks Explained
Why depends_on alone lets your app start before the database is ready, how healthcheck actually works, and how to use condition: service_healthy correctly.
Docker Compose Environment Variables Explained
The difference between a .env file, the environment: key, env_file:, and ${VAR-default} interpolation — and which one to reach for.
How to Use Mailpit with Symfony and Laravel in Docker Compose
Catch every outgoing email in a local web UI instead of accidentally sending real mail — the Mailpit setup and framework config for both Symfony Mailer and Laravel.
How to Expose MySQL Safely in Docker Compose
Publishing a database port to your host is a common local-dev convenience and an easy way to expose it further than intended. What actually happens, and how to keep it safe.
Running a Queue Worker in Docker Compose
Add a dedicated worker container for Symfony Messenger or Laravel queues — why it needs its own service, and the restart/scaling details that are easy to get wrong.
Setting Up Xdebug with Docker Compose and PhpStorm
The three settings that have to line up for step debugging to work in a container — client_host, the IDE key, and PhpStorm's path mappings — explained one at a time.