From 66c4d9903ae6d53522af0bc167ca9209da8ebd2d Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Thu, 12 Feb 2026 11:27:45 -0500 Subject: [PATCH 1/3] feat: standalone frontend uses production build instead of dev server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Override web service in docker-compose.standalone.yml to build from www/Dockerfile (multi-stage: deps → build → standalone runner) instead of running pnpm dev with bind-mounted source. --- COMPOSE_STANDALONE_TODO.md | 10 ++++++++++ docker-compose.standalone.yml | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 COMPOSE_STANDALONE_TODO.md diff --git a/COMPOSE_STANDALONE_TODO.md b/COMPOSE_STANDALONE_TODO.md new file mode 100644 index 00000000..25718745 --- /dev/null +++ b/COMPOSE_STANDALONE_TODO.md @@ -0,0 +1,10 @@ +# Standalone Compose: Remaining Production Work + +## Server/worker/beat: remove host network mode + bind mounts + +Currently `server` uses `network_mode: host` and all three services bind-mount `./server/:/app/` in the base `docker-compose.yml`. All overrides below go in `docker-compose.standalone.yml` only — do not modify the base file. + +- Override `network_mode` for server (remove host mode) +- Override volumes for server, worker, beat with `!reset []` (use built image only) +- Update `compose_cmd` in `setup-standalone.sh` to not rely on host network +- Change `SERVER_API_URL` from `http://host.docker.internal:1250` to `http://server:1250` (server reachable via Docker network once off host mode) diff --git a/docker-compose.standalone.yml b/docker-compose.standalone.yml index 682a4bd9..7d1a1e03 100644 --- a/docker-compose.standalone.yml +++ b/docker-compose.standalone.yml @@ -76,6 +76,15 @@ services: DIARIZATION_BACKEND: modal DIARIZATION_URL: http://cpu:8000 + web: + image: reflector-frontend-standalone + build: + context: ./www + command: ["node", "server.js"] + volumes: !reset [] + environment: + NODE_ENV: production + cpu: build: context: ./gpu/self_hosted From 34700920d44a2798633203c66e47cfa0a6d77ea6 Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Thu, 12 Feb 2026 14:58:58 -0500 Subject: [PATCH 2/3] chore: move standalone compose TODO to Huly issue RFFR-46 --- COMPOSE_STANDALONE_TODO.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 COMPOSE_STANDALONE_TODO.md diff --git a/COMPOSE_STANDALONE_TODO.md b/COMPOSE_STANDALONE_TODO.md deleted file mode 100644 index 25718745..00000000 --- a/COMPOSE_STANDALONE_TODO.md +++ /dev/null @@ -1,10 +0,0 @@ -# Standalone Compose: Remaining Production Work - -## Server/worker/beat: remove host network mode + bind mounts - -Currently `server` uses `network_mode: host` and all three services bind-mount `./server/:/app/` in the base `docker-compose.yml`. All overrides below go in `docker-compose.standalone.yml` only — do not modify the base file. - -- Override `network_mode` for server (remove host mode) -- Override volumes for server, worker, beat with `!reset []` (use built image only) -- Update `compose_cmd` in `setup-standalone.sh` to not rely on host network -- Change `SERVER_API_URL` from `http://host.docker.internal:1250` to `http://server:1250` (server reachable via Docker network once off host mode) From 4cc49215196d67aae9fb66f6d95da9a46462ac30 Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Thu, 12 Feb 2026 15:26:40 -0500 Subject: [PATCH 3/3] fix: add required env vars for standalone production frontend The standalone web service (node server.js) has no bind-mounted .env files and the base env_file (.env.local) has API_URL commented out. Next.js standalone server can't auto-load .env files without them on disk, so all required vars must be explicit in the compose override. --- docker-compose.standalone.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docker-compose.standalone.yml b/docker-compose.standalone.yml index 7d1a1e03..32fcbe58 100644 --- a/docker-compose.standalone.yml +++ b/docker-compose.standalone.yml @@ -84,6 +84,21 @@ services: volumes: !reset [] environment: NODE_ENV: production + # Browser-facing URLs (host-accessible ports) + API_URL: http://localhost:1250 + WEBSOCKET_URL: ws://localhost:1250 + SITE_URL: http://localhost:3000 + # Server-side URLs (docker-network internal) + SERVER_API_URL: http://server:1250 + KV_URL: redis://redis:6379 + KV_USE_TLS: "false" + # Standalone: no external auth provider + FEATURE_REQUIRE_LOGIN: "false" + NEXTAUTH_URL: http://localhost:3000 + NEXTAUTH_SECRET: standalone-local-secret + # Nullify partial auth vars inherited from base env_file + AUTHENTIK_ISSUER: "" + AUTHENTIK_REFRESH_TOKEN_URL: "" cpu: build: