fix(deploy): reuse shared server n8n
This commit is contained in:
@@ -62,6 +62,29 @@ curl -b cookies.txt http://localhost:8128/api/v1/workflows | grep succeeded
|
||||
A failed/offline n8n does not roll back the return — the outbox event simply stays
|
||||
`pending`/`failed` and is safely retryable from the Automation page.
|
||||
|
||||
### Existing shared n8n on the Unraid review server
|
||||
|
||||
The Unraid deployment uses the existing n8n at `http://192.168.10.150:5678`; it does not
|
||||
start MobilityOps's bundled n8n service. `compose.unraid.yaml` places that fallback behind
|
||||
the opt-in `bundled-n8n` profile. Configure the API target and publish the workflow with:
|
||||
|
||||
```bash
|
||||
sed -i \
|
||||
's|^N8N_WEBHOOK_URL=.*|N8N_WEBHOOK_URL=http://192.168.10.150:5678/webhook/mobilityops-return|' \
|
||||
.env
|
||||
./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 setup script reads the callback token from the mode-0600 deployment `.env`, builds and
|
||||
removes a temporary server-side import without writing the token to Git, and restarts the
|
||||
existing n8n so the production webhook is registered. The imported configuration remains
|
||||
inside n8n's protected application data. The callback travels through the MobilityOps web
|
||||
proxy, so the shared n8n container does not need direct database access or membership of
|
||||
the MobilityOps Docker network.
|
||||
|
||||
## Required operational checks
|
||||
|
||||
- API and web health (`GET /health`, web root `200`);
|
||||
|
||||
@@ -66,8 +66,10 @@ The same widths are automated in `frontend/e2e/ui-redesign.spec.ts`.
|
||||
- Authenticated network verification through the deployed web proxy returned HTTP 200
|
||||
for dashboard, vehicles, active booking, open quality issues, knowledge status,
|
||||
workflows and audit.
|
||||
- Container verification: PostgreSQL and API healthy, web HTTP 200, n8n `/healthz`
|
||||
returned `{"status":"ok"}`. Existing database and n8n volumes were preserved.
|
||||
- Container verification: PostgreSQL and API healthy, web HTTP 200, and the server's
|
||||
existing n8n on port 5678 returned healthy. No second MobilityOps n8n container is
|
||||
running. A synthetic return completed the shared-n8n callback on attempt 1 and the demo
|
||||
was reset to its deterministic start state.
|
||||
|
||||
## Performance choices
|
||||
|
||||
|
||||
Reference in New Issue
Block a user