chore(dev): add docker-compose.dev.yaml and default to same-origin UI

Adds an opt-in compose override that bind-mounts the three_cx provider
files (and the alembic versions dir, so newer local migrations resolve)
into the prebuilt API image — useful when iterating on a provider
without rebuilding. Loaded explicitly via
`docker compose -f docker-compose.yaml -f docker-compose.dev.yaml up`.

Also blanks the default `NEXT_PUBLIC_BACKEND_URL` in `ui/.env.example`
so the browser uses `window.location.origin` and the Next.js rewrite in
`next.config.ts` proxies `/api/v1/*` to the backend. This works for both
single-host dev and remote dev (where `localhost:8000` from the browser
points at the wrong machine).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
stefandsl 2026-05-26 15:05:13 +02:00
parent e15246a515
commit 592e6f7970
3 changed files with 10 additions and 3 deletions

7
docker-compose.dev.yaml Normal file
View file

@ -0,0 +1,7 @@
services:
api:
volumes:
- ./api/services/telephony/providers/three_cx:/app/api/services/telephony/providers/three_cx:ro
- ./api/services/telephony/providers/__init__.py:/app/api/services/telephony/providers/__init__.py:ro
- ./api/schemas/telephony_config.py:/app/api/schemas/telephony_config.py:ro
- ./api/alembic/versions:/app/api/alembic/versions:ro