monica_site needs FOSS address geocoding / soft validation (contact form + portal mailing list → Contact.postal_address). OSRM on ai-server-4080 (10.0.0.128:5000) is routing-only — it cannot search/validate street addresses.
Nominatim is the usual OSM companion: same PBF source as OSRM, separate container + Postgres/PostGIS import. Provision it beside OSRM the same way we did SearxNG (#10) and the homelab OSRM pattern (Ditch_The_Agent/OSRM).
docker-compose.yml — Nominatim API container (e.g. mediagis/nominatim)
scripts/import.sh (or similar) — one-shot PBF → Nominatim DB
README.md — sizing, LAN URL, UFW, smoke curl
.env.example — bind host, host port, PBF/dataset name
Do not reuse OSRM .osrm* graph files — only share the original .osm.pbf
Suggested location: ai_ml_operations/Nominatim (shared LAN service for monica_site + others) orDitch_The_Agent/Nominatim to match OSRM ownership. Either works if compose + import live in git.
Port note
Do not use host port 8080 or 8088.
On ai-server-4080 today:
Port
Service
5000
OSRM
8080
dta_webapp prod
8088
SearxNG
8082/8083
chat_web_app
Use 8089 for Nominatim (container 8080 → host 8089), unless inventory shows a better free port.
Consumers:
NOMINATIM_BASE_URL=http://10.0.0.128:8089
Data / sizing
Reuse the same Geofabrik PBF already used for OSRM preprocess (US extract on that host).
Nominatim builds its own Postgres DB — expect much more disk/RAM than OSRM graphs for full US.
If full-US import is too heavy, prefer a Midwest / Ohio (+ neighbors) extract for geocoding; OSRM can keep a larger routing extract if needed.
Document import time, disk, and RAM in the Nominatim README before running on 4080.
Add roles/nominatim/ (or deploy from cloned Nominatim repo under {{ apps_base_dir }}/nominatim) with:
defaults — image, dir, host port 8089, LAN CIDR, PBF path / dataset name
docker-compose template (or clone + compose from the Nominatim git repo)
tasks — dirs, env, UFW allow 8089/tcp from 10.0.0.0/24, docker compose up -d
Gate with nominatim_stack: true in inventory/host_vars/ai-server-4080.yml.
Wire into playbooks/site.yml under the ai-server-4080 play.
Document in IMPLEMENTATION.md / scripts/provision.sh help text.
Note consumer env: NOMINATIM_BASE_URL=http://10.0.0.128:8089 (monica_site later; optional DTA if needed).
Import may be manual first run (long-running) with Ansible only ensuring the stack + UFW + restart policy — same spirit as OSRM preprocess being a one-shot script.
## Why
`monica_site` needs **FOSS address geocoding / soft validation** (contact form + portal mailing list → `Contact.postal_address`). OSRM on **ai-server-4080** (`10.0.0.128:5000`) is routing-only — it cannot search/validate street addresses.
Nominatim is the usual OSM companion: same PBF **source** as OSRM, separate container + Postgres/PostGIS import. Provision it beside OSRM the same way we did SearxNG (#10) and the homelab OSRM pattern (`Ditch_The_Agent/OSRM`).
## Repo (app-owned, like OSRM)
Create a small ops repo mirroring [Ditch_The_Agent/OSRM](https://git.aimloperations.com/Ditch_The_Agent/OSRM):
- `docker-compose.yml` — Nominatim API container (e.g. `mediagis/nominatim`)
- `scripts/import.sh` (or similar) — one-shot PBF → Nominatim DB
- `README.md` — sizing, LAN URL, UFW, smoke `curl`
- `.env.example` — bind host, host port, PBF/dataset name
- **Do not** reuse OSRM `.osrm*` graph files — only share the original `.osm.pbf`
Suggested location: `ai_ml_operations/Nominatim` (shared LAN service for monica_site + others) **or** `Ditch_The_Agent/Nominatim` to match OSRM ownership. Either works if compose + import live in git.
## Port note
**Do not use host port 8080 or 8088.**
On ai-server-4080 today:
| Port | Service |
|------|---------|
| 5000 | OSRM |
| 8080 | dta_webapp prod |
| 8088 | SearxNG |
| 8082/8083 | chat_web_app |
Use **8089** for Nominatim (container 8080 → host 8089), unless inventory shows a better free port.
Consumers:
```text
NOMINATIM_BASE_URL=http://10.0.0.128:8089
```
## Data / sizing
- Reuse the **same Geofabrik PBF** already used for OSRM preprocess (US extract on that host).
- Nominatim builds its **own** Postgres DB — expect **much** more disk/RAM than OSRM graphs for full US.
- If full-US import is too heavy, prefer a Midwest / Ohio (+ neighbors) extract for geocoding; OSRM can keep a larger routing extract if needed.
- Document import time, disk, and RAM in the Nominatim README before running on 4080.
## Proposed server-infra work
Mirror the `searxng` role pattern (#10):
1. Add `roles/nominatim/` (or deploy from cloned Nominatim repo under `{{ apps_base_dir }}/nominatim`) with:
- defaults — image, dir, host port `8089`, LAN CIDR, PBF path / dataset name
- docker-compose template (or clone + compose from the Nominatim git repo)
- tasks — dirs, env, UFW allow `8089/tcp` from `10.0.0.0/24`, `docker compose up -d`
2. Gate with `nominatim_stack: true` in `inventory/host_vars/ai-server-4080.yml`.
3. Wire into `playbooks/site.yml` under the ai-server-4080 play.
4. Document in `IMPLEMENTATION.md` / `scripts/provision.sh` help text.
5. Note consumer env: `NOMINATIM_BASE_URL=http://10.0.0.128:8089` (monica_site later; optional DTA if needed).
Import may be **manual first run** (long-running) with Ansible only ensuring the stack + UFW + restart policy — same spirit as OSRM preprocess being a one-shot script.
## Acceptance criteria
- [ ] Nominatim ops repo exists (compose + import script + README), parallel to OSRM.
- [ ] `./scripts/provision.sh ai-server-4080` (or targeted role) brings up Nominatim on `10.0.0.128:8089` (or documented port).
- [ ] UFW allows `10.0.0.0/24` → Nominatim port only (not world-open).
- [ ] From adama/roslin/ai-server-4080: `curl -sG 'http://10.0.0.128:8089/search' --data-urlencode 'q=Akron, OH' -d 'format=json' -d 'limit=1'` returns JSON with lat/lon.
- [ ] Structured query smoke: `/search?street=...&city=...&state=Ohio&postalcode=...&format=json` works for a known Ohio address.
- [ ] Host port does **not** clash with OSRM `:5000`, dta `:8080`, SearxNG `:8088`, chat `:8082/:8083`.
- [ ] Docs state: share **PBF only** with OSRM; never mount `.osrm*` into Nominatim.
- [ ] Role is no-op on adama/roslin unless explicitly enabled.
## Related
- [Ditch_The_Agent/OSRM](https://git.aimloperations.com/Ditch_The_Agent/OSRM) — routing sibling on same host
- server-infra#10 — SearxNG on ai-server-4080 (same provision pattern)
- monica_site — contact / mailing-list `postal_address` (geocode soft-check next)
scripts/prepare-pbf.sh (copy/symlink PBF from OSRM data)
README / .env.example / .gitignore
Ready to clone on ai-server-4080 and wire Ansible in this issue.
Scaffold landed on main:
- https://git.aimloperations.com/ai_ml_operations/Nominatim
- `docker-compose.yml` (`mediagis/nominatim:5.1`, host **8089**)
- `scripts/prepare-pbf.sh` (copy/symlink PBF from OSRM data)
- README / `.env.example` / `.gitignore`
Ready to clone on ai-server-4080 and wire Ansible in this issue.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
monica_siteneeds FOSS address geocoding / soft validation (contact form + portal mailing list →Contact.postal_address). OSRM on ai-server-4080 (10.0.0.128:5000) is routing-only — it cannot search/validate street addresses.Nominatim is the usual OSM companion: same PBF source as OSRM, separate container + Postgres/PostGIS import. Provision it beside OSRM the same way we did SearxNG (#10) and the homelab OSRM pattern (
Ditch_The_Agent/OSRM).Repo (app-owned, like OSRM)
Create a small ops repo mirroring Ditch_The_Agent/OSRM:
docker-compose.yml— Nominatim API container (e.g.mediagis/nominatim)scripts/import.sh(or similar) — one-shot PBF → Nominatim DBREADME.md— sizing, LAN URL, UFW, smokecurl.env.example— bind host, host port, PBF/dataset name.osrm*graph files — only share the original.osm.pbfSuggested location:
ai_ml_operations/Nominatim(shared LAN service for monica_site + others) orDitch_The_Agent/Nominatimto match OSRM ownership. Either works if compose + import live in git.Port note
Do not use host port 8080 or 8088.
On ai-server-4080 today:
Use 8089 for Nominatim (container 8080 → host 8089), unless inventory shows a better free port.
Consumers:
Data / sizing
Proposed server-infra work
Mirror the
searxngrole pattern (#10):roles/nominatim/(or deploy from cloned Nominatim repo under{{ apps_base_dir }}/nominatim) with:8089, LAN CIDR, PBF path / dataset name8089/tcpfrom10.0.0.0/24,docker compose up -dnominatim_stack: trueininventory/host_vars/ai-server-4080.yml.playbooks/site.ymlunder the ai-server-4080 play.IMPLEMENTATION.md/scripts/provision.shhelp text.NOMINATIM_BASE_URL=http://10.0.0.128:8089(monica_site later; optional DTA if needed).Import may be manual first run (long-running) with Ansible only ensuring the stack + UFW + restart policy — same spirit as OSRM preprocess being a one-shot script.
Acceptance criteria
./scripts/provision.sh ai-server-4080(or targeted role) brings up Nominatim on10.0.0.128:8089(or documented port).10.0.0.0/24→ Nominatim port only (not world-open).curl -sG 'http://10.0.0.128:8089/search' --data-urlencode 'q=Akron, OH' -d 'format=json' -d 'limit=1'returns JSON with lat/lon./search?street=...&city=...&state=Ohio&postalcode=...&format=jsonworks for a known Ohio address.:5000, dta:8080, SearxNG:8088, chat:8082/:8083..osrm*into Nominatim.Related
postal_address(geocode soft-check next)Nominatim ops repo created: https://git.aimloperations.com/ai_ml_operations/Nominatim (scaffold next — compose + import script mirroring OSRM).
Scaffold landed on main:
docker-compose.yml(mediagis/nominatim:5.1, host 8089)scripts/prepare-pbf.sh(copy/symlink PBF from OSRM data).env.example/.gitignoreReady to clone on ai-server-4080 and wire Ansible in this issue.