Point dta_webapp webroot at realpath.app paths (closes #12) (#13)
Sync runner checkout / sync (push) Successful in 7s
Sync runner checkout / sync (push) Successful in 7s
## Summary
- Change `dta_webapp` `webroot_pattern` from `/var/www/{env}.app.ditchtheagent/html` → `/var/www/{env}.realpath.app/html`
- Update `IMPLEMENTATION.md` references to match
- **web-static:** before `compose up`, `docker rm -f` any container publishing the static host ports (`docker ps --filter publish=<port>`), then force-recreate when cleanup ran — clears orphan/legacy binders while keeping the same ports
Closes #12
Coordinates with [dta_webapp#48](Ditch_The_Agent/dta_webapp#48) / [PR #49](Ditch_The_Agent/dta_webapp#49) (`build:beta`/`build:prod` write to the same dirs; prod uses `prod.realpath.app`).
## Test plan
- [ ] Confirm `app_catalog.dta_webapp.webroot_pattern` expands to beta/prod realpath paths
- [ ] On a host with a leftover container on 8080/8081, run deploy and confirm it is removed and web-static rebinds
- [ ] After merge, redeploy `dta_webapp` beta (and prod when ready) and verify files under `/var/www/{env}.realpath.app/html`
- [ ] Hit web-static ports and confirm new build content servedReviewed-on: #13
This commit was merged in pull request #13.
This commit is contained in:
+6
-4
@@ -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/<env>.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/<env>.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/<env>.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,10 +256,12 @@ 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:<env>`
|
||||
(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.
|
||||
on their ports (from `host_apps`); NPM balances across hosts. Before `compose up`,
|
||||
removes any container currently publishing those host ports (`docker ps --filter
|
||||
publish=<port>`) so leftovers cannot block the bind, then recreates web-static.
|
||||
|
||||
### Reverse proxy / load balancing (NPM at 10.0.0.230)
|
||||
|
||||
@@ -289,7 +291,7 @@ point each domain at the backend(s):
|
||||
with a call to `server-infra/scripts/deploy.sh --app <name> --env <env> --ref <sha>`
|
||||
(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`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user