From 20c2d6c4189575372dfe6d286033f46425ad25a1 Mon Sep 17 00:00:00 2001 From: Ryan Westfall Date: Thu, 6 Aug 2026 10:42:20 -0500 Subject: [PATCH] Point dta_webapp webroot at realpath.app paths (closes #12) Align webroot_pattern and docs with dta_webapp builds under /var/www/{env}.realpath.app/html so deploy and web-static nginx serve the same dirs. --- IMPLEMENTATION.md | 6 +++--- inventory/group_vars/all.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index 1c2e8e6..c967d6f 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -194,7 +194,7 @@ After Docker install, re-SSH so the `docker` group membership takes effect. |-----|------|-------|------|-------| | `company_site` | django (docker) | adama + roslin (+ ai-server-4080) | prod | active/active behind NPM; beta port reserved | | `dta_service` | django (docker) | adama + roslin + ai-server-4080 | beta + prod | active/active behind NPM | -| `dta_webapp` | node/vite static | adama + roslin (+ ai-server-4080) | beta + prod | active/active; built to `/var/www/.app.ditchtheagent/html`, served by web-static nginx | +| `dta_webapp` | node/vite static | adama + roslin (+ ai-server-4080) | beta + prod | active/active; built to `/var/www/.realpath.app/html`, served by web-static nginx | | `scha` | django (docker) | adama + roslin + ai-server-4080 | prod | active/active behind NPM; beta port reserved | | `chat_web_app` | node-static (CRA) | adama + roslin + ai-server-4080 | beta + prod | active/active; built to `/var/www/.chat.aimloperations/html`, served by web-static nginx | | `chat_backend` | django (docker) | adama + roslin + ai-server-4080 | beta + prod | active/active behind NPM; Ollama `http://10.0.0.128:11434`; SearxNG `http://10.0.0.128:8088` (`SEARXNG_BASE_URL`) | @@ -256,7 +256,7 @@ chat_backend secrets must use `SEARXNG_BASE_URL=http://10.0.0.128:8088`. to host `{{ apps_env_dir }}` → git checkout at ref → copy `.env` into checkout → `docker compose build` → `up -d` → migrate (run once, shared DB). - **node-static**: git checkout at ref → `npm ci` → `npm run build:` - (writes to the app's `webroot_pattern`, e.g. `/var/www/{env}.app.ditchtheagent/html` + (writes to the app's `webroot_pattern`, e.g. `/var/www/{env}.realpath.app/html` or `/var/www/{env}.chat.aimloperations/html`). - **web-static** role: one nginx container per app host serving the static roots on their ports (from `host_apps`); NPM balances across hosts. @@ -289,7 +289,7 @@ point each domain at the backend(s): with a call to `server-infra/scripts/deploy.sh --app --env --ref ` (keep the test/docker jobs). - [ ] `dta_webapp`: `npm run build:beta` / `build:prod` output to - `/var/www/beta.app.ditchtheagent/html` / `/var/www/prod.app.ditchtheagent/html`. + `/var/www/beta.realpath.app/html` / `/var/www/prod.realpath.app/html`. - [ ] `chat_web_app`: `npm run build:beta` / `build:prod` output to `/var/www/beta.chat.aimloperations/html` / `/var/www/prod.chat.aimloperations/html`. diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 7a2ff04..0b459c0 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -77,7 +77,7 @@ app_catalog: subdir: ditch-the-agent # Document root served by nginx and written by `npm run build:`. # {env} is replaced with the entry's env (beta/prod). - webroot_pattern: "/var/www/{env}.app.ditchtheagent/html" + webroot_pattern: "/var/www/{env}.realpath.app/html" # deploy runs `npm ci` then `npm run build:`; that script writes to # {{ web_static_root }}/_dta_webapp (beta/prod), served by web-static. scha: