$ recombobulate _
home / tips / build-a-multi-service-docker-compose-stack-from-a-description
0

Build a Multi-Service Docker Compose Stack from a Description

bagwaa @bagwaa · Mar 25, 2026 · Workflows
build-a-multi-service-docker-compose-stack-from-a-description

Writing a docker-compose.yml for a multi-service setup involves a lot of boilerplate — volumes, networks, healthchecks, env vars, dependency ordering. Describe what you need and Claude will wire it all up.

Write a docker-compose.yml for a Laravel app with:
- PHP-FPM 8.3 app container
- Nginx web server
- PostgreSQL 16 with a named volume for data persistence
- Redis for queues and sessions
- A queue worker container running the same image as the app
- All services on a shared internal network
- An .env file for credentials

Claude will produce a complete compose file with proper depends_on health checks, named volumes, and a sensible network layout — not just a skeleton you have to fill in yourself.

You can also ask it to add common extras:

Add a Mailpit container for local email testing and expose it on port 8025.
Also add a schedule container running `artisan schedule:work`.

Or ask Claude to review an existing compose file for issues:

Here's my current docker-compose.yml. What's wrong with it and how would you
improve the healthchecks, volume mounts, and startup order?

A compose file you didn't have to write from scratch is one that actually gets committed to the repo.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago