marvis docker container, ignore ueransim

This commit is contained in:
Jake Kasper
2026-04-24 10:29:19 -04:00
parent 3228db3097
commit a0e77aabd6
18 changed files with 278 additions and 51 deletions

View File

@@ -5,6 +5,44 @@ This document describes the complete architecture and deployment procedure for t
---
## Deployment Model
The target environment for this project is a host where services are started by
`systemd`, including Docker-backed services. Marvis is intended to run the same
way:
- the FastAPI app runs on `127.0.0.1:8100`
- Traefik exposes it at `/core/marvis/*`
- `patch-ncm.py` injects the sidebar entries and iframe routes into the NCM UI
- the injected entries should only be added for services that are actually
reachable on the host when the patch is applied
For a containerised deployment without Compose, this repo includes an example
unit file at `config/p5g-marvis.service`.
### Build the image
```bash
docker build -t p5g-marvis:latest .
```
### Install the systemd unit
```bash
cp config/p5g-marvis.service /usr/lib/systemd/system/p5g-marvis.service
systemctl daemon-reload
systemctl enable --now p5g-marvis
```
Marvis will then be reachable on:
```text
http://127.0.0.1:8100
http://127.0.0.1:8100/api/docs
```
---
## Architecture Overview
```
@@ -206,11 +244,17 @@ JS="/etc/athonet/ems-frontend/advanced/assets/index-Cw8Irsq8.js"
cd /opt/p5g-marvis && python3 patch-ncm.py'
```
`patch-ncm.py` injects only the services it detects as reachable on the host:
- `P5G_MARVIS_ENABLED=true|false` overrides Marvis detection
- `P5G_RADIO_ENABLED=true|false` overrides Radio detection
- by default it probes `127.0.0.1:8100` for Marvis and `127.0.0.1:4000` for Radio
Expected output:
```
Applied: sidebar entry
Applied: marvis + radio routes with Or wrapper
Applied: /marvis permissions entry
Applied: injected iframe routes
Applied: permissions entry
Done — P5G Marvis: 10 occurrences, P5G Radio: 3 occurrences
```