chore(deploy): add reproducible Unraid deployment
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
services:
|
||||||
|
db:
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
api:
|
||||||
|
restart: unless-stopped
|
||||||
|
ports: !reset []
|
||||||
|
|
||||||
|
web:
|
||||||
|
restart: unless-stopped
|
||||||
|
ports: !override
|
||||||
|
- "1236:80"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1/health"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
|
n8n:
|
||||||
|
restart: unless-stopped
|
||||||
|
ports: !override
|
||||||
|
- "127.0.0.1:5678:5678"
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
[
|
||||||
|
"CMD",
|
||||||
|
"node",
|
||||||
|
"-e",
|
||||||
|
"fetch('http://127.0.0.1:5678/healthz').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))",
|
||||||
|
]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 20
|
||||||
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
## Server layout
|
||||||
|
|
||||||
|
- Directory: `/mnt/user/appdata/mobilityops`
|
||||||
|
- 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:5678` only; use an SSH tunnel for setup
|
||||||
|
|
||||||
|
## Deploy
|
||||||
|
|
||||||
|
Create `.env` from `.env.example`, replace every placeholder secret, set
|
||||||
|
`MOBILITYOPS_ENV=production`, set both public URLs to
|
||||||
|
`http://192.168.10.150:1236`, and retain `KNOWLEDGE_PROVIDER=demo` while RAGcore is not
|
||||||
|
available. Keep `MCP_HUB_REGISTRATION_ENABLED=false` until the central Hub is ready.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /mnt/user/appdata/mobilityops
|
||||||
|
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 exec api \
|
||||||
|
python -m app.cli seed --reset
|
||||||
|
```
|
||||||
|
|
||||||
|
Migrations run automatically in the API entrypoint. For the one-time n8n owner setup,
|
||||||
|
forward a local port over SSH to server loopback, open that local URL, then run the
|
||||||
|
documented workflow import/publish commands from `docs/17-runbook.md` with both Compose
|
||||||
|
files supplied.
|
||||||
|
|
||||||
|
## Operate
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
Reference in New Issue
Block a user