Add Unraid all-in-one runtime
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-17 04:41:50 +02:00
parent ed083d1f3a
commit e553ce845b
17 changed files with 422 additions and 104 deletions
+48 -50
View File
@@ -1,30 +1,38 @@
# GeoIntel Unraid template
# GeoIntel Unraid all-in-one container
GeoIntel is a multi-container Docker Compose stack:
GeoIntel can run on Unraid as one Docker container.
- `db`: PostGIS 16 / PostGIS 3.4
- `backend`: FastAPI/GIS runtime
- `frontend`: nginx-served React app with `/api` and `/health` proxying to the backend
Inside that single container:
The normal browser entrypoint is:
- embedded PostGIS stores the application database
- Alembic migrations run at startup
- FastAPI runs on internal `127.0.0.1:8000`
- nginx serves the React/MapLibre frontend on container port `80`
- nginx proxies `/api` and `/health` to the internal backend
The browser entrypoint is:
```text
http://<unraid-ip>:${GEOINTEL_FRONTEND_PORT}
```
## Files
- `geointel.env.example`: copy this to the repository checkout as `.env`.
- `geointel-unraid-template.xml`: Unraid/DockerMan-style metadata for the editable settings.
- `geointel-icon.svg`: icon source for template/app metadata.
The frontend also serves the same icon at:
The app icon is served from the same container:
```text
http://<unraid-ip>:${GEOINTEL_FRONTEND_PORT}/geointel-icon.svg
```
## First setup on Unraid
## Files
- `docker-compose.unraid.yml`: recommended single-container Compose stack.
- `deploy/unraid/Dockerfile.all-in-one`: builds the single container.
- `deploy/unraid/all-in-one-start.sh`: starts embedded PostGIS, backend and nginx.
- `deploy/unraid/nginx-all-in-one.conf`: frontend and API proxy config for one container.
- `deploy/unraid/geointel.env.example`: copy to `.env` and edit ports/paths.
- `deploy/unraid/geointel-unraid-template.xml`: Unraid/DockerMan metadata for editable fields.
- `deploy/unraid/geointel-icon.svg`: icon source.
## First setup with Compose Manager
From the Unraid shell:
@@ -33,59 +41,46 @@ cd /mnt/user/appdata
git clone gitea-widefrog:NuklearRabbit/geointel.git geointel
cd /mnt/user/appdata/geointel
cp deploy/unraid/geointel.env.example .env
```
Edit `.env` before starting the stack:
```bash
nano .env
```
Common values:
```env
GEOINTEL_FRONTEND_PORT=1202
GEOINTEL_BACKEND_PORT=8000
GEOINTEL_STORAGE_PATH=/mnt/user/appdata/geointel/storage
GEOINTEL_POSTGRES_PASSWORD=change-me-before-shared-use
GEOINTEL_CORS_ORIGINS=http://localhost:1202,http://127.0.0.1:1202,http://192.168.10.150:1202
```
Start or rebuild:
```bash
docker compose config
docker compose up -d --build
docker compose -f docker-compose.unraid.yml config
docker compose -f docker-compose.unraid.yml up -d --build
```
Validate:
```bash
bash scripts/live_migration_smoke.sh
bash scripts/verify_browser_runtime.sh "http://192.168.10.150:${GEOINTEL_FRONTEND_PORT:-1202}"
curl -fsS "http://192.168.10.150:${GEOINTEL_FRONTEND_PORT:-1202}/health"
curl -fsS "http://192.168.10.150:${GEOINTEL_FRONTEND_PORT:-1202}/api/v1/projects"
curl -I "http://192.168.10.150:${GEOINTEL_FRONTEND_PORT:-1202}/geointel-icon.svg"
```
## Change ports
## Change the browser port
Change the web UI port:
Edit `.env`:
```env
GEOINTEL_FRONTEND_PORT=1203
```
If you expose a different web port, also update CORS origins:
```env
GEOINTEL_CORS_ORIGINS=http://localhost:1203,http://127.0.0.1:1203,http://192.168.10.150:1203
```
Apply:
```bash
docker compose up -d --build
docker compose -f docker-compose.unraid.yml up -d --build
```
The database port is intentionally not published to the LAN. The backend reaches it through the internal Compose service name `db`.
## Persistent paths
Recommended Unraid paths:
```env
GEOINTEL_STORAGE_PATH=/mnt/user/appdata/geointel/storage
GEOINTEL_POSTGIS_DATA_PATH=/mnt/user/appdata/geointel/postgres-data
```
`GEOINTEL_STORAGE_PATH` contains uploads, tiles, masks, reports and exports.
`GEOINTEL_POSTGIS_DATA_PATH` contains the embedded PostGIS database files.
## Update from Gitea
@@ -93,11 +88,10 @@ The database port is intentionally not published to the LAN. The backend reaches
cd /mnt/user/appdata/geointel
git fetch origin main
git reset --hard origin/main
docker compose up -d --build
bash scripts/live_migration_smoke.sh
docker compose -f docker-compose.unraid.yml up -d --build
```
## Cleanup notes
## Safe cleanup
Safe cache cleanup if Docker build cache fills the Unraid Docker image:
@@ -106,3 +100,7 @@ docker builder prune -af
```
Avoid broad volume pruning unless you explicitly intend to remove persisted PostGIS data or GeoIntel artifacts.
## Multi-container development stack
The root `docker-compose.yml` remains available for development and CI-like validation with separate `db`, `backend` and `frontend` services. For Unraid app-style operation, prefer `docker-compose.unraid.yml`.