feat(devops): self-hosted OSRM routing engine for site-finder (#39) #1929
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1929
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/39-osrm-routing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Self-hosted OSRM routing engine for site-finder so
/analyzecan later use real road/walking distances to POI instead of straight-lineST_Distance(geography). Infra only — the/analyzeintegration is a separate follow-up (A2 isochrones / A3 per-category routing-decay). Backend does NOT talk to OSRM yet.What changed
docker-compose.prod.yml— newosrmservice:osrm/osrm-backend:latest,osrm-routed --algorithm mld --max-table-size 8000 /data/${OSRM_REGION:-sverdlovsk}.osrm,mem_limit: 1.5g,restart: unless-stopped, networkdefaultonly. Noports:— internal-only; backend reaches it athttp://osrm:5000, Caddy does not proxy it. Healthcheck is abash /dev/tcpport-probe (the OSRM image ships no curl/wget).backenddoes notdepends_onosrm, so a crash-loop before the graph is built can't block deploy.scripts/build_osrm.sh— idempotent MLD build/refresh (extract -> partition -> customize, NOTcontract). Default: download Ural-FO extract + clip to Свердл bbox viaosmium(lighter RAM). Options:CLIP=0(zero-clip whole Ural-FO),EKB_TIGHT=1(narrow ЕКБ bbox),WALK=1(optional foot profile). Monthly-refresh cron note included.docs/osrm-routing.md— region/pbf decision, RAM table, full VPS run-commands, verify curl, optionalosrm-walkblock for Phase-2..gitignore—data/osrm/*(don't commit ~1.5GB build output);.gitkeepholds the dir.Decisions / deviations from the issue draft
osrm-contract+ports: 5000:5000. Corrected: MLD requirespartition+customize(contract is the CH algorithm, incompatible with--algorithm mld); port kept internal-only per routing-being-private.lon 57.2-66.2, lat 56.0-62.0). Documented tradeoffs.WALK=1) + a documented (not-yet-added)osrm-walkservice, to avoid an idle container until/analyzeintegrates.VPS run-commands (orchestrator, after merge)
Test plan
docker compose -f docker-compose.prod.yml configrenders the osrm block (command/mem/volume/network/healthcheck)bash -n+shellcheck -S warningclean onscripts/build_osrm.shup -d osrm+ verify curl returns{"code":"Ok"}up -d osrm(free -h); fall back toEKB_TIGHT=1if tightRisks / open
free -hfirst;EKB_TIGHT=1(~0.4-0.6GB) or upgrade plan if tight.Refs #39