From 592e6f7970c65ce6ab37ca71ec4c8542c3ab139e Mon Sep 17 00:00:00 2001 From: stefandsl Date: Tue, 26 May 2026 15:05:13 +0200 Subject: [PATCH] chore(dev): add docker-compose.dev.yaml and default to same-origin UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- docker-compose.dev.yaml | 7 +++++++ ui/.env.example | 2 +- ui/package-lock.json | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 docker-compose.dev.yaml diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml new file mode 100644 index 00000000..6d99cc53 --- /dev/null +++ b/docker-compose.dev.yaml @@ -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 diff --git a/ui/.env.example b/ui/.env.example index 741790e5..185aa15c 100644 --- a/ui/.env.example +++ b/ui/.env.example @@ -1,3 +1,3 @@ BACKEND_URL=http://localhost:8000 -NEXT_PUBLIC_BACKEND_URL=http://localhost:8000 +NEXT_PUBLIC_BACKEND_URL= NEXT_PUBLIC_NODE_ENV=development diff --git a/ui/package-lock.json b/ui/package-lock.json index 9923bb0f..6017771b 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ui", - "version": "1.30.1", + "version": "1.31.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ui", - "version": "1.30.1", + "version": "1.31.0", "dependencies": { "@dagrejs/dagre": "^1.1.4", "@radix-ui/react-alert-dialog": "^1.1.15",