fix(deploy): reuse shared server n8n

This commit is contained in:
NuklearRabbit
2026-08-02 03:56:17 +02:00
parent 686b62f592
commit 1f292e14bb
12 changed files with 234 additions and 61 deletions
+20 -17
View File
@@ -22,11 +22,13 @@
| `db` | running, 0 restarts | healthy | none (`5432/tcp` internal) |
| `api` | running, 0 restarts | healthy | none (`8000/tcp` internal) |
| `web` | running, 0 restarts | healthy | `1236:80` on LAN |
| `n8n` | running, 0 restarts | healthy | `127.0.0.1:15678:5678` only |
| shared host `n8n` | running | healthy | `5678:5678` on LAN; outside MobilityOps Compose |
No unrelated container was stopped, recreated, or modified. Port `1236` was confirmed
unused by listeners, Docker containers, and existing Compose projects before deployment.
The requested directory did not exist and was created specifically for MobilityOps.
The final review topology reuses the n8n container that was already running on the host.
Its empty public-host/editor URL settings were corrected in the persistent Unraid template
so workflow execution URLs are valid. The temporary Compose-owned n8n container was
removed without deleting its retained volume. Port `1236` was confirmed unused before the
original deployment; the application directory was created specifically for MobilityOps.
## Deployment commands
@@ -54,15 +56,13 @@ ssh unraid
cd /mnt/user/appdata/mobilityops
tar -xzf .deploy/source.tar.gz
./deploy/unraid/configure-env.sh http://192.168.10.150:1236
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml up --build -d
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml up --build -d db api web
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml exec -T api \
python -m app.cli seed --reset
./deploy/unraid/setup-n8n.sh http://127.0.0.1:15678
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml exec -T n8n \
n8n import:workflow --input=//imports/mobilityops-return-processing.json
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml exec -T n8n \
n8n publish:workflow --id=mobilityops-return-processing
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml restart n8n
./deploy/unraid/setup-existing-n8n.sh \
n8n \
http://192.168.10.150:1236/api/v1/integrations/n8n/return-callback
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml up -d db api web
```
The server `.env` was created from `.env.example`, is mode `0600`, and contains generated
@@ -88,8 +88,9 @@ included here or in Git.
- Return workflow: `BK-DEMO-RETURN` accepted 54,700 km, created `INSP-0076` and
`DQ-RET-0076`, preserved the 54,820 km canonical odometer, and changed the booking to
returned.
- n8n round trip: event prefix `250f6c0e` reached `succeeded` on attempt 1; the callback
and `return_registered` audit events were visible in the UI.
- Shared-n8n round trip: final verification event `b32a593e-c946-4782-a180-518385b66b50`
reached `succeeded` on attempt 1 with no last error; the deterministic reset afterwards
restored `BK-DEMO-RETURN` to `active`.
- Data quality: `DQ-RET-0076` displayed the persisted regression evidence and related
booking/inspection references.
- Knowledge: UI truthfully showed `Provider: demo · available · 10 procedures indexed`;
@@ -102,8 +103,9 @@ included here or in Git.
- ITWorx MCP Hub: registration disabled with `MCP_HUB_REGISTRATION_ENABLED=false`; the
independently authenticated provider endpoints remain available internally to the web
proxy/API boundary, but no live Hub connection is claimed.
- n8n: deployed, healthy, editor loopback-only, owner initialized, workflow imported and
published, and a real return delivery succeeded.
- n8n: the existing server instance at `http://192.168.10.150:5678` is healthy; the
MobilityOps workflow is imported/published there and a real return delivery succeeded.
The bundled MobilityOps service is disabled by default in the Unraid overlay.
## Known limitations
@@ -119,7 +121,7 @@ to `.deploy/source.tar.gz`. On Unraid, preserve `.env` and the named volumes, th
```bash
cd /mnt/user/appdata/mobilityops
tar -xzf .deploy/source.tar.gz
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml up --build -d
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml up --build -d db api web
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml exec -T api alembic current
curl -fsS http://127.0.0.1:1236/health
```
@@ -130,7 +132,8 @@ curl -fsS http://127.0.0.1:1236/health
cd /mnt/user/appdata/mobilityops
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml ps
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml logs --tail=200
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml logs -f api web n8n
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml logs -f api web
docker logs -f n8n
```
## Safe rollback
@@ -3,7 +3,7 @@
Date: 2026-08-02
Branch: `design/mobilityops-premium-ui`
Baseline revision: `dfabb41582e302f45a3de826f85f531bf23dfc8b`
Final design revision: `b3946af4e0e14f2a3acecd212e9f0079e3028fca`
Revision: final branch head reported in the review handoff
Review URL: `http://192.168.10.150:1236`
## Outcome
@@ -45,8 +45,8 @@ return registration gained an evidence-based review boundary before commit.
| Backend tests | 66 passed |
| Backend lint | ruff passed |
| Backend types | mypy: 0 issues in 44 files |
| Frontend types/build | passed; 59 modules; 238.66 kB JS and 36.54 kB CSS before gzip |
| Browser journeys | 18 passed locally |
| Frontend types/build | passed; 59 modules; 240.24 kB JS and 36.63 kB CSS before gzip |
| Browser journeys | 19 passed locally |
| Horizontal overflow | none at 390/768/1280/1440 px |
| Accessibility | named landmarks, skip link, visible focus, text-plus-shape status, labelled mobile rows, reduced-motion support |
| Deployed browser smoke | passed on all 10 authenticated routes plus login at desktop and mobile sizes |
@@ -57,7 +57,9 @@ Synthetic-data labelling is persistent on login and authenticated surfaces.
Deployed evidence is stored in `artifacts/design-validation/implementation/deployed/`.
The review stack reports healthy PostgreSQL/API state, HTTP 200 from the web application,
and `{"status":"ok"}` from n8n's internal health endpoint.
and healthy state from the server's existing n8n at port 5678. A synthetic return reached
`succeeded` on attempt 1 through that shared n8n and its MobilityOps callback; the demo was
then reset to its deterministic state.
## Performance observations
@@ -66,9 +68,12 @@ and CSS visuals, and the production bundle remains appropriate for this internal
## Known limitations
- The global search visual is a non-submitting orientation cue because no cross-entity
query API exists; all route-level search and filters are live. It is intentionally not
presented as an action button.
- Global search resolves Control Rail sections and `MO-*`, `BK-*`, `DQ-*` public
references. It intentionally does not offer customer lookup because the locked PoC has
no customer detail route or cross-entity search API.
- The repository retains a bundled n8n service for standalone local clean-checkout demos.
The Unraid overlay keeps it behind the opt-in `bundled-n8n` profile; the live review
deployment uses the server's existing shared n8n instead.
- The MCP Hub state is correctly shown as not configured in the current PoC rather than
simulated as healthy.
- Live RAGcore and MCP Hub round trips remain subject to the existing environment limits