Update dta_webapp static document-root pattern from ditchtheagent paths to RealPath host-shaped paths so server-infra deploy + web-static nginx match dta_webapp#48 / PR #49.
Change
In inventory/group_vars/all.yml for dta_webapp:
Path
Old
/var/www/{env}.app.ditchtheagent/html
New
/var/www/{env}.realpath.app/html
Expands to:
beta → /var/www/beta.realpath.app/html
prod → /var/www/prod.realpath.app/html
Also update docs (IMPLEMENTATION.md) that still reference the old paths.
Why
roles/app-deploy/tasks/node_static.yml creates _webroot from webroot_pattern, then runs npm run build:<env>. roles/web-static nginx root uses the same pattern. If this stays on *.app.ditchtheagent while the webapp writes to *.realpath.app, deploys land in a dir nginx does not serve.
Coordination
dta_webapp build:beta / build:prod must write to the same paths (prod must be prod.realpath.app, not bare realpath.app, to fit {env}).
Edge TLS / public server_name for realpath.app is outside this catalog entry (web-static uses server_name _;).
After merge + redeploy, beta/prod builds appear under /var/www/{beta,prod}.realpath.app/html and web-static serves them
## Summary
Update `dta_webapp` static document-root pattern from `ditchtheagent` paths to RealPath host-shaped paths so server-infra deploy + web-static nginx match [dta_webapp#48](https://git.aimloperations.com/Ditch_The_Agent/dta_webapp/issues/48) / [PR #49](https://git.aimloperations.com/Ditch_The_Agent/dta_webapp/pulls/49).
## Change
In `inventory/group_vars/all.yml` for `dta_webapp`:
| | Path |
|---|---|
| **Old** | `/var/www/{env}.app.ditchtheagent/html` |
| **New** | `/var/www/{env}.realpath.app/html` |
Expands to:
- beta → `/var/www/beta.realpath.app/html`
- prod → `/var/www/prod.realpath.app/html`
Also update docs (`IMPLEMENTATION.md`) that still reference the old paths.
## Why
`roles/app-deploy/tasks/node_static.yml` creates `_webroot` from `webroot_pattern`, then runs `npm run build:<env>`. `roles/web-static` nginx `root` uses the same pattern. If this stays on `*.app.ditchtheagent` while the webapp writes to `*.realpath.app`, deploys land in a dir nginx does not serve.
## Coordination
- dta_webapp `build:beta` / `build:prod` must write to the same paths (prod must be `prod.realpath.app`, not bare `realpath.app`, to fit `{env}`).
- Edge TLS / public `server_name` for `realpath.app` is outside this catalog entry (web-static uses `server_name _;`).
- dta_service secrets/CORS already handled separately.
## Acceptance
- [ ] `webroot_pattern` updated
- [ ] Docs updated
- [ ] After merge + redeploy, beta/prod builds appear under `/var/www/{beta,prod}.realpath.app/html` and web-static serves them
Follow-up on this PR: yes, port-based cleanup is possible and now in the branch.
roles/web-static before docker compose up:
For each host_apps static port → docker ps -q --filter publish=<port>
docker rm -f those container IDs (includes current web-static if running)
compose up -d --force-recreate when anything was removed
Ports stay 8080/8081/etc.; this only clears whoever is holding them so the managed nginx can bind.
Follow-up on this PR: **yes, port-based cleanup is possible** and now in the branch.
`roles/web-static` before `docker compose up`:
1. For each `host_apps` static port → `docker ps -q --filter publish=<port>`
2. `docker rm -f` those container IDs (includes current web-static if running)
3. `compose up -d --force-recreate` when anything was removed
Ports stay 8080/8081/etc.; this only clears whoever is holding them so the managed nginx can bind.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Update
dta_webappstatic document-root pattern fromditchtheagentpaths to RealPath host-shaped paths so server-infra deploy + web-static nginx match dta_webapp#48 / PR #49.Change
In
inventory/group_vars/all.ymlfordta_webapp:/var/www/{env}.app.ditchtheagent/html/var/www/{env}.realpath.app/htmlExpands to:
/var/www/beta.realpath.app/html/var/www/prod.realpath.app/htmlAlso update docs (
IMPLEMENTATION.md) that still reference the old paths.Why
roles/app-deploy/tasks/node_static.ymlcreates_webrootfromwebroot_pattern, then runsnpm run build:<env>.roles/web-staticnginxrootuses the same pattern. If this stays on*.app.ditchtheagentwhile the webapp writes to*.realpath.app, deploys land in a dir nginx does not serve.Coordination
build:beta/build:prodmust write to the same paths (prod must beprod.realpath.app, not barerealpath.app, to fit{env}).server_nameforrealpath.appis outside this catalog entry (web-static usesserver_name _;).Acceptance
webroot_patternupdated/var/www/{beta,prod}.realpath.app/htmland web-static serves themFollow-up on this PR: yes, port-based cleanup is possible and now in the branch.
roles/web-staticbeforedocker compose up:host_appsstatic port →docker ps -q --filter publish=<port>docker rm -fthose container IDs (includes current web-static if running)compose up -d --force-recreatewhen anything was removedPorts stay 8080/8081/etc.; this only clears whoever is holding them so the managed nginx can bind.