Build Unraid image without Compose labels
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
- Added a PNG DockerMan icon and made the Unraid template name match the running `geointel` container.
|
||||
- Added DockerMan labels to the all-in-one Compose service so Unraid can associate the running container with web UI and icon metadata.
|
||||
- Added `deploy/unraid/run-dockerman-container.sh` so repo deploys automatically replace Compose-owned containers with a DockerMan-native `geointel` container while preserving/migrating persisted data.
|
||||
- Switched Tower deploy image creation from `docker compose build` to plain `docker build` to avoid Compose metadata labels on the final DockerMan-managed container.
|
||||
- Updated Tower deploy scripts to install `/boot/config/plugins/dockerMan/templates-user/my-geointel.xml` and `/boot/config/plugins/dockerMan/images/geointel-icon.png`.
|
||||
- Updated Tower deploy scripts to stop the old multi-container stack without removing volumes and start the all-in-one stack.
|
||||
- Updated the Unraid template so the Docker can be edited from Unraid with one web port, storage path, PostGIS data path and app icon.
|
||||
|
||||
@@ -85,7 +85,7 @@ Copy the Unraid env template to `.env` in the checkout and edit ports/paths ther
|
||||
cd /mnt/user/appdata/geointel
|
||||
cp deploy/unraid/geointel.env.example .env
|
||||
nano .env
|
||||
docker compose -f docker-compose.unraid.yml build geointel
|
||||
docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest .
|
||||
bash deploy/unraid/run-dockerman-container.sh
|
||||
```
|
||||
|
||||
@@ -99,7 +99,7 @@ GEOINTEL_POSTGIS_DATA_PATH=/mnt/user/appdata/geointel/postgres-data
|
||||
|
||||
The backend and PostGIS ports are intentionally not exposed to the LAN in the all-in-one runtime. See `deploy/unraid/README.md` for full setup, port-change and cleanup notes.
|
||||
|
||||
On Tower/Unraid, `scripts/deploy_tower.ps1` and `scripts/deploy_tower.sh` automatically install the editable DockerMan template as `/boot/config/plugins/dockerMan/templates-user/my-geointel.xml`, install the PNG icon as `/boot/config/plugins/dockerMan/images/geointel-icon.png`, remove any old Compose-owned `geointel` container and start the final container with DockerMan labels.
|
||||
On Tower/Unraid, `scripts/deploy_tower.ps1` and `scripts/deploy_tower.sh` validate the Compose reference but build with plain `docker build`, then automatically install the editable DockerMan template as `/boot/config/plugins/dockerMan/templates-user/my-geointel.xml`, install the PNG icon as `/boot/config/plugins/dockerMan/images/geointel-icon.png`, remove any old Compose-owned `geointel` container and start the final container with DockerMan labels.
|
||||
|
||||
## Sprint 2 quick start
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ def test_unraid_readme_explains_port_changes_and_safe_cleanup() -> None:
|
||||
|
||||
assert "cp deploy/unraid/geointel.env.example .env" in readme
|
||||
assert "GEOINTEL_FRONTEND_PORT=1203" in readme
|
||||
assert "docker compose -f docker-compose.unraid.yml build geointel" in readme
|
||||
assert "docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest ." in readme
|
||||
assert "bash deploy/unraid/run-dockerman-container.sh" in readme
|
||||
assert "net.unraid.docker.managed=dockerman" in readme
|
||||
assert "curl -fsS" in readme
|
||||
@@ -106,7 +106,8 @@ def test_tower_deploy_uses_single_container_unraid_compose() -> None:
|
||||
|
||||
for script in (powershell, bash):
|
||||
assert "docker compose -f docker-compose.unraid.yml config" in script
|
||||
assert "docker compose -f docker-compose.unraid.yml build geointel" in script
|
||||
assert "docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest ." in script
|
||||
assert "docker compose -f docker-compose.unraid.yml build geointel" not in script
|
||||
assert "bash deploy/unraid/run-dockerman-container.sh" in script
|
||||
assert "LIVE_SMOKE_CONTAINER=geointel bash scripts/live_migration_smoke.sh" in script
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ http://<unraid-ip>:${GEOINTEL_FRONTEND_PORT}/geointel-icon.png
|
||||
|
||||
## Files
|
||||
|
||||
- `docker-compose.unraid.yml`: build definition for the all-in-one image.
|
||||
- `docker-compose.unraid.yml`: config validation reference 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.
|
||||
@@ -72,11 +72,11 @@ 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 build geointel
|
||||
docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest .
|
||||
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.
|
||||
The repository deploy scripts run the same flow automatically. They validate the Compose reference, build the image with plain `docker build`, 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:
|
||||
|
||||
@@ -99,7 +99,7 @@ GEOINTEL_CORS_ORIGINS=http://localhost:1203,http://127.0.0.1:1203,http://192.168
|
||||
Apply:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.unraid.yml build geointel
|
||||
docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest .
|
||||
bash deploy/unraid/run-dockerman-container.sh
|
||||
```
|
||||
|
||||
@@ -122,7 +122,7 @@ 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 build geointel
|
||||
docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest .
|
||||
bash deploy/unraid/run-dockerman-container.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -1523,10 +1523,11 @@ Expected Unraid behavior:
|
||||
|
||||
Changed:
|
||||
- Added `deploy/unraid/run-dockerman-container.sh` as the single source of truth for the final Unraid container launch.
|
||||
- Updated Tower deploy scripts so repository deploys build the image with Compose but start the final container with `docker run` and DockerMan labels.
|
||||
- Updated Tower deploy scripts so repository deploys validate the Compose reference, build the image with plain `docker build` and start the final container with `docker run` plus DockerMan labels.
|
||||
- The launch script installs the DockerMan template/icon, removes old `geointel` containers, preserves/migrates the old Compose PostGIS volume when needed and starts the final `geointel` container as DockerMan-managed.
|
||||
- Updated live migration smoke to support direct container execution through `LIVE_SMOKE_CONTAINER=geointel`.
|
||||
|
||||
Expected Unraid behavior:
|
||||
- A deploy from the repo should no longer leave the final app as a plain Compose-owned container.
|
||||
- The final image/container should avoid Compose metadata labels that can confuse Unraid's Docker page.
|
||||
- The running `geointel` container should expose `net.unraid.docker.managed=dockerman`, web UI metadata and icon metadata immediately after deploy.
|
||||
|
||||
@@ -34,7 +34,7 @@ git reset --hard 'origin/$RemoteBranch'
|
||||
chmod +x scripts/*.sh backend/docker_start.sh deploy/unraid/*.sh || true
|
||||
|
||||
docker compose -f docker-compose.unraid.yml config >/dev/null
|
||||
docker compose -f docker-compose.unraid.yml build geointel
|
||||
docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest .
|
||||
bash deploy/unraid/run-dockerman-container.sh
|
||||
|
||||
if [ -x scripts/live_migration_smoke.sh ]; then
|
||||
|
||||
@@ -35,7 +35,7 @@ git checkout -B "$REMOTE_BRANCH" "origin/$REMOTE_BRANCH"
|
||||
chmod +x scripts/*.sh backend/docker_start.sh deploy/unraid/*.sh || true
|
||||
|
||||
docker compose -f docker-compose.unraid.yml config >/dev/null
|
||||
docker compose -f docker-compose.unraid.yml build geointel
|
||||
docker build -f deploy/unraid/Dockerfile.all-in-one -t geointel-all-in-one:latest .
|
||||
bash deploy/unraid/run-dockerman-container.sh
|
||||
|
||||
if [[ -x scripts/live_migration_smoke.sh ]]; then
|
||||
|
||||
Reference in New Issue
Block a user