Code for a demo of Docker Compose I gave at a local meetup. See the accompanying slides.
Don't pay too much attention to the Laravel code. I chose Laravel because I could setup "complex" use cases (mail and queuing) with minimal effort.
Files of interest:
docker-compose.yaml
Dockerfile
docker/nginx/nginx.conf
To start the application run docker-compose up --detach --build
.
To test mail, open Mailhog and visit /mail.
To see queues in action, open the Horizon Dashboard and trigger a job by visiting /queue.
Run the app container with docker-compose run --rm app bash
.