Add mysql-debug to local development stack and update related configurations

This commit is contained in:
Jeppe Bundgaard
2026-03-12 13:48:07 +01:00
parent 5cb197898d
commit c78ea57409
6 changed files with 23 additions and 10 deletions
+15 -2
View File
@@ -16,9 +16,9 @@ Backend API for Copenhagen Truck Wash services.
- PHP 8.2 CLI (optional, for host-side testing)
### Local Development
To bring up the minimal development stack (Traefik, Redis, Caddy, and one PHP worker):
To bring up the minimal development stack (Traefik, Redis, MySQL debug DB, Caddy, and one PHP worker):
```powershell
docker compose up -d traefik redis php1 caddy
docker compose up -d traefik redis mysql-debug php1 caddy
```
The API is accessible at:
@@ -80,6 +80,19 @@ Optional overrides:
- Skip image build: `-SkipBuild` or `SKIP_BUILD=1`
- Force image rebuild: `-ForceBuild` or `FORCE_BUILD=1`
### Clone Live DB Into `mysql-debug` Service
To refresh the docker-compose debug DB from live credentials in `.env`:
PowerShell:
```powershell
powershell -ExecutionPolicy Bypass -File .\scripts\clone-live-to-debug-db.ps1 -Force
```
Bash:
```bash
FORCE=1 ./scripts/clone-live-to-debug-db.sh
```
### Test Layout
- `tests/Unit/*`: isolated unit and route-level behavior tests.
- `tests/Integration/*`: Redis/DB-backed tests intended for Docker/CI environments.