95 lines
2.8 KiB
Markdown
95 lines
2.8 KiB
Markdown
# Scripts
|
|
|
|
Setup-, import-, demo- en maintenance-scripts voor GeoIntel.
|
|
|
|
## Runtime verification
|
|
|
|
Verify the browser-facing Docker/LAN runtime:
|
|
|
|
```bash
|
|
bash scripts/verify_browser_runtime.sh http://192.168.10.150:1202
|
|
bash scripts/verify_gis_runtime.sh http://192.168.10.150:1202
|
|
```
|
|
|
|
Verify the explicit demo workflow plus export artifact path:
|
|
|
|
```bash
|
|
bash scripts/verify_demo_export_workflow.sh http://192.168.10.150:1202
|
|
```
|
|
|
|
The demo/export smoke is intentionally mutating and idempotent: it seeds the
|
|
offline fixture demo if needed, verifies the project area GeoJSON, fixture
|
|
datasets, vector FeatureCollection content, vector feature summary, persisted
|
|
QA/QC metrics, creates metadata/report/vector GeoJSON exports, lists exports
|
|
and downloads the JSON/GeoJSON/HTML artifacts through the frontend proxy.
|
|
|
|
Verify a configured local YOLO model without running inference:
|
|
|
|
```bash
|
|
python scripts/yolo_preflight.py --model-path /absolute/path/to/model.pt --tile-manifest-path /absolute/path/to/manifest.json --check-model-load --json
|
|
```
|
|
|
|
Against the Docker runtime:
|
|
|
|
```bash
|
|
docker compose exec -T backend python scripts/yolo_preflight.py --model-path /absolute/path/to/model.pt --tile-manifest-path /absolute/path/to/manifest.json --check-model-load --json
|
|
```
|
|
|
|
The model-load smoke is opt-in, requires real optional AI dependencies, refuses
|
|
`--assume-dependencies`, loads only the supplied local file and does not download
|
|
weights or run prediction.
|
|
|
|
Clean old offline demo export artifacts without touching uploaded source data:
|
|
|
|
```bash
|
|
python scripts/cleanup_demo_artifacts.py
|
|
python scripts/cleanup_demo_artifacts.py --keep-latest 3 --apply
|
|
```
|
|
|
|
Against the Docker runtime, run the backend-container entrypoint:
|
|
|
|
```bash
|
|
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py
|
|
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py --keep-latest 3 --apply
|
|
```
|
|
|
|
The cleanup script is dry-run by default. It only targets the explicit
|
|
`GeoIntel Demo - Building QA` project unless `--project-name` is provided, keeps
|
|
the newest exports per matching project, deletes only `exports` rows/files when
|
|
`--apply` is set, and refuses to remove files outside the configured
|
|
`STORAGE_ROOT`.
|
|
|
|
## Tower deployment
|
|
|
|
Push the local branch to Gitea, then rebuild the Unraid/Tower Docker runtime:
|
|
|
|
```bash
|
|
bash scripts/deploy_tower.sh
|
|
```
|
|
|
|
From the Codex Windows workspace, use the PowerShell wrapper:
|
|
|
|
```powershell
|
|
.\scripts\deploy_tower.ps1
|
|
```
|
|
|
|
For the first deployment into an existing non-Git appdata folder, bootstrap the
|
|
checkout explicitly:
|
|
|
|
```bash
|
|
DEPLOY_BOOTSTRAP=1 bash scripts/deploy_tower.sh
|
|
```
|
|
|
|
```powershell
|
|
.\scripts\deploy_tower.ps1 -Bootstrap
|
|
```
|
|
|
|
Useful overrides:
|
|
|
|
```bash
|
|
REMOTE_HOST=root@192.168.10.150
|
|
REMOTE_PATH=/mnt/user/appdata/geointel
|
|
REMOTE_REPO=gitea-widefrog:NuklearRabbit/geointel.git
|
|
FRONTEND_URL=http://192.168.10.150:1202
|
|
```
|