1- .PHONY : help setup setup-quick finish-setup run run-local stop logs rebuild destroy download-pbf download-datasets build-taxonomy build-brands seed-regions seed-cuisines seed-tags seed-pois seed-all seed-city enrich-taxonomy-only enrich-pois enrich-distributed enrich-worker fetch-wikipedia fetch-websites fetch-mapillary sync-search generate-embeddings search-setup db-dump db-restore
1+ .PHONY : help setup setup-quick finish-setup run stop logs rebuild destroy download-pbf download-datasets build-taxonomy build-brands seed-regions seed-cuisines seed-tags seed-pois seed-all seed-city enrich-taxonomy-only enrich-pois enrich-distributed enrich-worker fetch-wikipedia fetch-websites fetch-mapillary sync-search generate-embeddings search-setup db-dump db-restore
22CYAN := \033[36m
33GREEN := \033[32m
44YELLOW := \033[33m
3333 @printf " $( CYAN) setup$( RESET) First-time setup (seed + taxonomy + search). Resume: make setup FROM=6\n"
3434 @printf " $( CYAN) setup-quick$( RESET) Quick setup from db/dump.sql (skip seed + enrich)\n"
3535 @printf " $( CYAN) finish-setup$( RESET) Sync search index + generate embeddings\n"
36- @printf " $( CYAN) run$( RESET) Start on localhost:3000\n"
37- @printf " $( CYAN) run-local$( RESET) Start exposed to local network (same WiFi)\n"
36+ @printf " $( CYAN) run$( RESET) Start on localhost:3000 (also accessible on local network)\n"
3837
3938 @printf " $(CYAN)stop$(RESET) Stop services (keeps data)\n"
4039 @printf " $(CYAN)logs$(RESET) View database logs\n"
@@ -185,18 +184,9 @@ setup-quick:
185184 @printf " $( GREEN) Quick setup complete!$( RESET) Run 'make run' to start\n"
186185
187186run :
188- @printf " $( GREEN) Starting Obelisk...$( RESET) \n"
189- @printf " \n"
190- @printf " $( GREEN) App starting at http://localhost:3000$( RESET) \n"
191- @printf " Press Ctrl+C to stop\n"
192- @printf " \n"
193- $(COMPOSE ) up
194-
195- run-local :
196- @printf " $( GREEN) Starting Obelisk for local network...$( RESET) \n"
197187 @LOCAL_IP=$$(hostname -I | awk '{print $$1}' ) ; \
188+ printf " $( GREEN) Starting Obelisk...$( RESET) \n" ; \
198189 printf " \n" ; \
199- printf " $( GREEN) App starting:$( RESET) \n" ; \
200190 printf " Local: http://localhost:3000\n" ; \
201191 printf " Network: http://$$ LOCAL_IP:3000\n" ; \
202192 printf " \n" ; \
@@ -280,7 +270,7 @@ enrich-distributed:
280270 @printf " $( GREEN) Ollama healthy$( RESET) \n"
281271 @printf " \n"
282272 @LOCAL_IP=$$(hostname -I | awk '{print $$1}' ) ; \
283- PG_PASS =$$(grep -oP 'POSTGRES_PASSWORD =\K.*' .env 2>/dev/null || echo 'obelisk_dev ' ) ; \
273+ COORD_SECRET =$$(grep -oP 'COORDINATOR_SECRET =\K.*' .env 2>/dev/null || echo '' ) ; \
284274 printf " $( CYAN) [2/4]$( RESET) Printing worker instructions...\n" ; \
285275 printf " \n" ; \
286276 printf " ═══════════════════════════════════════════════════\n" ; \
@@ -297,15 +287,17 @@ enrich-distributed:
297287 printf " 3. Pull the Ollama model:\n" ; \
298288 printf " ollama pull $( OLLAMA_MODEL) \n" ; \
299289 printf " \n" ; \
300- printf " 4. Start enrichment:\n" ; \
301- printf " DATABASE_URL=\" postgresql://obelisk:$$ PG_PASS@$$ LOCAL_IP:5432/obelisk\" \\\\ \n" ; \
290+ printf " 4. Copy DATABASE_URL and COORDINATOR_SECRET from coordinator .env\n" ; \
291+ printf " Then start enrichment:\n" ; \
292+ printf " DATABASE_URL=\" <from coordinator .env>\" \\\\ \n" ; \
302293 printf " ENRICH_COORDINATOR_URL=\" http://$$ LOCAL_IP:3939\" \\\\ \n" ; \
294+ printf " COORDINATOR_SECRET=\" <from coordinator .env>\" \\\\ \n" ; \
303295 printf " make enrich-worker\n" ; \
304296 printf " \n" ; \
305297 printf " Monitor: curl http://$$ LOCAL_IP:3939/status | jq\n" ; \
306298 printf " ═══════════════════════════════════════════════════\n" ; \
307299 printf " \n"
308- @printf " $( CYAN) [3/5 ]$( RESET) Tuning Ollama for parallel inference...\n"
300+ @printf " $( CYAN) [3/4 ]$( RESET) Tuning Ollama for parallel inference...\n"
309301 @CURRENT=$$(curl -sf $(OLLAMA_URL ) /api/ps 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin ) .get(' models' ,[{}])[0].get(' context_length' ,0))" 2>/dev/null || echo 0); \
310302 VRAM_FREE=$$(nvidia-smi --query-gpu=memory.free --format=csv,noheader,nounits 2>/dev/null | head -1 || echo 0 ) ; \
311303 NUM_PAR=$$ {OLLAMA_NUM_PARALLEL:-4}; \
@@ -321,12 +313,11 @@ enrich-distributed:
321313 printf " OLLAMA_NUM_PARALLEL=$$ NUM_PAR ollama serve\n" ; \
322314 fi ; \
323315 printf " \n"
324- @printf " $( CYAN) [4/5 ]$( RESET) Starting coordinator...\n"
316+ @printf " $( CYAN) [4/4 ]$( RESET) Starting coordinator + local worker ...\n"
325317 @$(COMPOSE ) exec -d -T app bun scripts/enrich-coordinator.ts
326318 @sleep 2
327319 @printf " $( GREEN) Coordinator running on :3939$( RESET) \n"
328320 @printf " \n"
329- @printf " $( CYAN) [5/5]$( RESET) Starting local enrichment worker...\n"
330321 $(COMPOSE ) exec -e ENRICH_COORDINATOR_URL=http://localhost:3939 -e ENRICH_CONCURRENCY=6 app bun scripts/enrich-pois.ts
331322
332323enrich-worker :
0 commit comments