Deploy GeoIntel as DockerMan native container
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 05:28:16 +02:00
parent 14a9d7db02
commit e555af0508
9 changed files with 219 additions and 35 deletions
+12 -6
View File
@@ -1,6 +1,6 @@
# GeoIntel Unraid all-in-one container
GeoIntel can run on Unraid as one Docker container.
GeoIntel can run on Unraid as one DockerMan-native container.
Inside that single container:
@@ -25,9 +25,10 @@ http://<unraid-ip>:${GEOINTEL_FRONTEND_PORT}/geointel-icon.png
## Files
- `docker-compose.unraid.yml`: recommended single-container Compose stack.
- `docker-compose.unraid.yml`: build definition for the all-in-one image.
- `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/run-dockerman-container.sh`: starts/replaces the running container with DockerMan labels and editable Unraid metadata.
- `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.
@@ -60,7 +61,7 @@ net.unraid.docker.icon=/boot/config/plugins/dockerMan/images/geointel-icon.png
These labels are required because a plain Compose container can run correctly while still missing the normal Unraid edit/icon controls.
## First setup with Compose Manager
## First setup from the repo
From the Unraid shell:
@@ -71,9 +72,12 @@ 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
docker compose -f docker-compose.unraid.yml build geointel
bash deploy/unraid/run-dockerman-container.sh
```
The repository deploy scripts run the same flow automatically. They build the image, install the DockerMan template/icon, remove any old Compose-owned `geointel` container, preserve/migrate the PostGIS data path and start the final container with DockerMan labels.
Validate:
```bash
@@ -95,7 +99,8 @@ GEOINTEL_CORS_ORIGINS=http://localhost:1203,http://127.0.0.1:1203,http://192.168
Apply:
```bash
docker compose -f docker-compose.unraid.yml up -d --build
docker compose -f docker-compose.unraid.yml build geointel
bash deploy/unraid/run-dockerman-container.sh
```
## Persistent paths
@@ -117,7 +122,8 @@ GEOINTEL_POSTGIS_DATA_PATH=/mnt/user/appdata/geointel/postgres-data
cd /mnt/user/appdata/geointel
git fetch origin main
git reset --hard origin/main
docker compose -f docker-compose.unraid.yml up -d --build
docker compose -f docker-compose.unraid.yml build geointel
bash deploy/unraid/run-dockerman-container.sh
```
## Safe cleanup
+75
View File
@@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT"
if [ -f .env ]; then
set -a
# shellcheck disable=SC1091
. ./.env
set +a
fi
GEOINTEL_FRONTEND_PORT="${GEOINTEL_FRONTEND_PORT:-1202}"
GEOINTEL_STORAGE_PATH="${GEOINTEL_STORAGE_PATH:-/mnt/user/appdata/geointel/storage}"
GEOINTEL_POSTGIS_DATA_PATH="${GEOINTEL_POSTGIS_DATA_PATH:-/mnt/user/appdata/geointel/postgres-data}"
GEOINTEL_POSTGRES_DB="${GEOINTEL_POSTGRES_DB:-geointel}"
GEOINTEL_POSTGRES_USER="${GEOINTEL_POSTGRES_USER:-geointel}"
GEOINTEL_POSTGRES_PASSWORD="${GEOINTEL_POSTGRES_PASSWORD:-geointel}"
GEOINTEL_CORS_ORIGINS="${GEOINTEL_CORS_ORIGINS:-http://localhost:${GEOINTEL_FRONTEND_PORT},http://127.0.0.1:${GEOINTEL_FRONTEND_PORT},http://192.168.10.150:${GEOINTEL_FRONTEND_PORT}}"
GEOINTEL_MAX_UPLOAD_MB="${GEOINTEL_MAX_UPLOAD_MB:-500}"
install_dockerman_metadata() {
if [ -d /boot/config/plugins/dockerMan ]; then
mkdir -p /boot/config/plugins/dockerMan/templates-user /boot/config/plugins/dockerMan/images
cp deploy/unraid/geointel-unraid-template.xml /boot/config/plugins/dockerMan/templates-user/my-geointel.xml
cp deploy/unraid/geointel-icon.png /boot/config/plugins/dockerMan/images/geointel-icon.png
fi
}
migrate_compose_volume_if_needed() {
if [ -f "${GEOINTEL_POSTGIS_DATA_PATH}/PG_VERSION" ]; then
return 0
fi
local compose_volume_path
compose_volume_path="$(docker volume inspect geointel_geointel_postgis --format '{{ .Mountpoint }}' 2>/dev/null || true)"
if [ -z "$compose_volume_path" ] || [ ! -f "${compose_volume_path}/PG_VERSION" ]; then
return 0
fi
echo "Migrating existing Compose PostGIS volume to ${GEOINTEL_POSTGIS_DATA_PATH}..."
mkdir -p "$GEOINTEL_POSTGIS_DATA_PATH"
cp -a "${compose_volume_path}/." "$GEOINTEL_POSTGIS_DATA_PATH/"
}
install_dockerman_metadata
docker compose down --remove-orphans || true
if docker ps -a --format '{{.Names}}' | grep -qx geointel; then
docker rm -f geointel
fi
mkdir -p "$GEOINTEL_STORAGE_PATH" "$GEOINTEL_POSTGIS_DATA_PATH"
migrate_compose_volume_if_needed
docker run -d \
--name geointel \
--restart unless-stopped \
--label net.unraid.docker.managed=dockerman \
--label 'net.unraid.docker.webui=http://[IP]:[PORT:80]/' \
--label net.unraid.docker.icon=/boot/config/plugins/dockerMan/images/geointel-icon.png \
-p "${GEOINTEL_FRONTEND_PORT}:80" \
-e GEOINTEL_POSTGRES_DB="$GEOINTEL_POSTGRES_DB" \
-e GEOINTEL_POSTGRES_USER="$GEOINTEL_POSTGRES_USER" \
-e GEOINTEL_POSTGRES_PASSWORD="$GEOINTEL_POSTGRES_PASSWORD" \
-e GEOINTEL_STORAGE_ROOT=/app/storage \
-e GEOINTEL_CORS_ORIGINS="$GEOINTEL_CORS_ORIGINS" \
-e GEOINTEL_MAX_UPLOAD_MB="$GEOINTEL_MAX_UPLOAD_MB" \
-v "${GEOINTEL_POSTGIS_DATA_PATH}:/var/lib/postgresql/data" \
-v "${GEOINTEL_STORAGE_PATH}:/app/storage" \
geointel-all-in-one:latest
docker ps --filter name=geointel