Local Infra with Docker Compose
Provide local dependencies (database, cache, mail catcher) with consistent setup across the team.
Recommended approach
Use Docker Compose for local PostgreSQL, Redis, and email inspection tooling.
Typical services:
- Postgres for app data
- Redis for cache/jobs
- Mailhog (or equivalent) for local email testing
Alternatives and when to choose them
- Managed dev services when local infra setup is costly.
- Testcontainers only for projects minimizing persistent local services.
Implementation checklist
- Keep service ports explicit and documented.
- Persist local volumes for developer productivity.
- Add health checks for dependent app startup.
Common pitfalls
- Port collisions between projects.
- Divergent local compose files not tracked in git.