Shared Docker services used across all local Laravel projects.
| Service | Directory | Purpose |
|---|---|---|
| nginx-proxy | proxy/ |
SSL termination and routing for all local .test domains |
| MySQL | mysql/ |
Shared MySQL 8.4 server for all projects |
| Redis | redis/ |
Shared Redis cache server for all projects |
| Mailpit | mailpit/ |
Shared mail capture for all projects — dashboard at http://localhost:8025 |
Start all services once from the ~/docker/ directory — they restart automatically after that.
cd ~/docker && docker compose up -dImportant: always use
docker compose down && docker compose up -d(not justup -d) when restarting services. If a container is recreated withoutdownfirst — e.g. after resolving a port conflict — it may not rejoin its Docker network, making it unreachable from project containers and causing slow or broken app behaviour.
Then follow NEW_PROJECT.md in any project repo to wire up a new app.
Certs are not stored in this repo — generate them per machine:
# Install mkcert CA (WSL + Windows browsers)
mkcert -install
powershell.exe -Command "Start-Process powershell -Verb RunAs -ArgumentList 'cd $(wslpath -w $(mkcert -CAROOT)); certutil -addstore -f Root rootCA.pem'"Per-project certs are generated during project setup (see NEW_PROJECT.md).
See mysql/README.md for connection details and per-project database management.
Apps are slow or failing to connect to Redis/MySQL/Mailpit
Check that each shared container is actually attached to its network:
docker network inspect redis-shared --format '{{range .Containers}}{{.Name}} {{end}}'
docker network inspect mailpit-shared --format '{{range .Containers}}{{.Name}} {{end}}'
docker network inspect mysql-shared --format '{{range .Containers}}{{.Name}} {{end}}'Each line should include both the shared service container (redis, mailpit, mysql) and the project app containers. If a service is missing, recreate it:
cd ~/docker && docker compose down && docker compose up -dWarning: never run
docker compose down -v— the-vflag removes volumes and will permanently delete all MySQL data stored inmysql/data/.