126 lines
3.7 KiB
Markdown
126 lines
3.7 KiB
Markdown
# GeoIntel Unraid all-in-one container
|
|
|
|
GeoIntel can run on Unraid as one Docker container.
|
|
|
|
Inside that single container:
|
|
|
|
- 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}
|
|
```
|
|
|
|
The app icons are served from the same container:
|
|
|
|
```text
|
|
http://<unraid-ip>:${GEOINTEL_FRONTEND_PORT}/geointel-icon.svg
|
|
http://<unraid-ip>:${GEOINTEL_FRONTEND_PORT}/geointel-icon.png
|
|
```
|
|
|
|
## 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`: frontend favicon source.
|
|
- `deploy/unraid/geointel-icon.png`: DockerMan/Unraid icon source.
|
|
- `frontend/public/geointel-icon.svg`: frontend-served SVG icon.
|
|
- `frontend/public/geointel-icon.png`: frontend-served PNG icon.
|
|
|
|
The Tower deploy scripts also copy the editable DockerMan template to:
|
|
|
|
```text
|
|
/boot/config/plugins/dockerMan/templates-user/my-geointel.xml
|
|
```
|
|
|
|
and copy the PNG icon to:
|
|
|
|
```text
|
|
/boot/config/plugins/dockerMan/images/geointel-icon.png
|
|
```
|
|
|
|
The template name is `geointel` so it matches the running all-in-one container name. If the Unraid Docker page was already open, refresh it after deploy so DockerMan reloads the template/icon metadata.
|
|
|
|
## First setup with Compose Manager
|
|
|
|
From the Unraid shell:
|
|
|
|
```bash
|
|
cd /mnt/user/appdata
|
|
git clone gitea-widefrog:NuklearRabbit/geointel.git geointel
|
|
cd /mnt/user/appdata/geointel
|
|
cp deploy/unraid/geointel.env.example .env
|
|
nano .env
|
|
docker compose -f docker-compose.unraid.yml config
|
|
docker compose -f docker-compose.unraid.yml up -d --build
|
|
```
|
|
|
|
Validate:
|
|
|
|
```bash
|
|
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"
|
|
curl -I "http://192.168.10.150:${GEOINTEL_FRONTEND_PORT:-1202}/geointel-icon.png"
|
|
```
|
|
|
|
## Change the browser port
|
|
|
|
Edit `.env`:
|
|
|
|
```env
|
|
GEOINTEL_FRONTEND_PORT=1203
|
|
GEOINTEL_CORS_ORIGINS=http://localhost:1203,http://127.0.0.1:1203,http://192.168.10.150:1203
|
|
```
|
|
|
|
Apply:
|
|
|
|
```bash
|
|
docker compose -f docker-compose.unraid.yml up -d --build
|
|
```
|
|
|
|
## 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
|
|
|
|
```bash
|
|
cd /mnt/user/appdata/geointel
|
|
git fetch origin main
|
|
git reset --hard origin/main
|
|
docker compose -f docker-compose.unraid.yml up -d --build
|
|
```
|
|
|
|
## Safe cleanup
|
|
|
|
Safe cache cleanup if Docker build cache fills the Unraid Docker image:
|
|
|
|
```bash
|
|
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`.
|