Deploy GeoIntel as DockerMan native container
This commit is contained in:
@@ -58,7 +58,9 @@ 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 up -d --build" in readme
|
||||
assert "docker compose -f docker-compose.unraid.yml build geointel" 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
|
||||
assert "docker builder prune -af" in readme
|
||||
assert "Avoid broad volume pruning" in readme
|
||||
@@ -67,6 +69,7 @@ def test_unraid_readme_explains_port_changes_and_safe_cleanup() -> None:
|
||||
def test_unraid_all_in_one_runtime_starts_embedded_postgis_backend_and_nginx() -> None:
|
||||
dockerfile = (ROOT / "deploy" / "unraid" / "Dockerfile.all-in-one").read_text(encoding="utf-8")
|
||||
start_script = (ROOT / "deploy" / "unraid" / "all-in-one-start.sh").read_text(encoding="utf-8")
|
||||
dockerman_script = (ROOT / "deploy" / "unraid" / "run-dockerman-container.sh").read_text(encoding="utf-8")
|
||||
nginx_config = (ROOT / "deploy" / "unraid" / "nginx-all-in-one.conf").read_text(encoding="utf-8")
|
||||
dockerignore = (ROOT / ".dockerignore").read_text(encoding="utf-8")
|
||||
|
||||
@@ -85,6 +88,10 @@ def test_unraid_all_in_one_runtime_starts_embedded_postgis_backend_and_nginx() -
|
||||
assert "python -m alembic upgrade head" in start_script
|
||||
assert "uvicorn app.main:app --host 127.0.0.1 --port 8000 &" in start_script
|
||||
assert 'exec nginx -g "daemon off;"' in start_script
|
||||
assert "docker run -d" in dockerman_script
|
||||
assert "--label net.unraid.docker.managed=dockerman" in dockerman_script
|
||||
assert "migrate_compose_volume_if_needed" in dockerman_script
|
||||
assert "docker rm -f geointel" in dockerman_script
|
||||
assert "proxy_pass http://127.0.0.1:8000/api/" in nginx_config
|
||||
assert "proxy_pass http://127.0.0.1:8000/health" in nginx_config
|
||||
assert "location = /geointel-icon.png" in nginx_config
|
||||
@@ -98,13 +105,18 @@ def test_tower_deploy_uses_single_container_unraid_compose() -> None:
|
||||
bash = (ROOT / "scripts" / "deploy_tower.sh").read_text(encoding="utf-8")
|
||||
|
||||
for script in (powershell, bash):
|
||||
assert "/boot/config/plugins/dockerMan/templates-user/my-geointel.xml" in script
|
||||
assert "/boot/config/plugins/dockerMan/images/geointel-icon.png" in script
|
||||
assert "docker compose down --remove-orphans || true" in script
|
||||
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 compose -f docker-compose.unraid.yml up -d" in script
|
||||
assert "COMPOSE_FILE=docker-compose.unraid.yml bash scripts/live_migration_smoke.sh" 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
|
||||
|
||||
|
||||
def test_live_migration_smoke_supports_dockerman_native_container() -> None:
|
||||
script = (ROOT / "scripts" / "live_migration_smoke.sh").read_text(encoding="utf-8")
|
||||
|
||||
assert 'LIVE_SMOKE_CONTAINER="${LIVE_SMOKE_CONTAINER:-}"' in script
|
||||
assert "run_container_smoke()" in script
|
||||
assert 'docker exec -i "$container_name" sh' in script
|
||||
|
||||
|
||||
def test_frontend_and_unraid_icon_assets_are_present() -> None:
|
||||
|
||||
Reference in New Issue
Block a user