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
+17 -14
View File
@@ -1,8 +1,9 @@
# Unraid deployment
MobilityOps is deployed from a committed source archive; the server does not need Gitea
credentials. The portable `compose.yaml` is combined with `compose.unraid.yaml` so that
only the web application is reachable from the LAN.
credentials. The portable `compose.yaml` is combined with `compose.unraid.yaml`; of the
MobilityOps-owned services, only the web application is reachable from the LAN. The host's
existing shared n8n remains available on its established port 5678.
## Server layout
@@ -10,7 +11,7 @@ only the web application is reachable from the LAN.
- Compose project: `mobilityops`
- Web: `http://192.168.10.150:1236` (`1236` on the host to `80` in `web`)
- API and PostgreSQL: Compose network only
- n8n editor: server loopback `127.0.0.1:15678` only; use an SSH tunnel for setup
- Shared n8n: `http://192.168.10.150:5678` (outside the MobilityOps Compose project)
## Deploy
@@ -21,25 +22,26 @@ available. Keep `MCP_HUB_REGISTRATION_ENABLED=false` until the central Hub is re
```bash
cd /mnt/user/appdata/mobilityops
./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
./deploy/unraid/configure-env.sh \
http://192.168.10.150:1236 \
http://192.168.10.150:5678/webhook/mobilityops-return
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 api \
python -m app.cli seed --reset
```
Migrations run automatically in the API entrypoint. Complete the one-time n8n owner
setup without exposing its editor to the LAN, then import and publish the workflow:
Migrations run automatically in the API entrypoint. Import and publish the MobilityOps
workflow into the existing n8n container:
```bash
./deploy/unraid/setup-n8n.sh http://127.0.0.1:15678
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml exec n8n \
n8n import:workflow --input=//imports/mobilityops-return-processing.json
docker compose -p mobilityops -f compose.yaml -f compose.unraid.yaml exec 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
```
The generated n8n owner credentials remain only in the mode-`0600` server `.env`.
The callback token remains server-side and is never written to the repository. The
bundled n8n service is retained only as a standalone fallback behind the explicit
`bundled-n8n` Compose profile; it is not started in this deployment.
## Operate
@@ -48,4 +50,5 @@ 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 exec api alembic current
docker logs --tail=200 n8n
```