From 7f1520d6f49e53b3b196903278fe434bfb111f7c Mon Sep 17 00:00:00 2001 From: Till JS Date: Wed, 15 Apr 2026 14:23:54 +0200 Subject: [PATCH] chore(dev): wire mana-crawler into the local dev stack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three small config changes so the Kontext "Aus URL" flow (next commit) is runnable from a plain `pnpm dev:mana:all`: - package.json: include mana-crawler in the dev:mana:servers concurrently group, and pass DATABASE_URL=…/mana_platform so the Go binary doesn't try to connect to a non-existent `mana` DB (its hardcoded default). - .env.development: publish MANA_CRAWLER_URL=http://localhost:3023 (the crawler's default binary port — the macmini container is a 3014 override, kept only in docker-compose). Also surface MANA_LLM_DEFAULT_MODEL for the summariser. - docker-compose.macmini.yml: inject MANA_CRAWLER_URL + the default-model env into the mana-api container so production can reach the internal crawler and pick the summariser model consistently. No runtime code touched. Co-Authored-By: Claude Opus 4.6 (1M context) --- .env.development | 9 +++++++++ docker-compose.macmini.yml | 2 ++ package.json | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index a03b362d4..e50583d77 100644 --- a/.env.development +++ b/.env.development @@ -176,6 +176,15 @@ OLLAMA_URL=http://localhost:11434 # the GPU LLM proxy (gpu-llm.mana.how). MANA_LLM_URL=https://llm.mana.how MANA_LLM_API_KEY= +MANA_LLM_DEFAULT_MODEL=gemma3:4b + +# mana-crawler — Go service. Default binary port is 3023 (local dev); +# the macmini docker-compose overrides to 3014 internally. Used by the +# Kontext URL import endpoint (POST /api/v1/context/import-url) to +# fetch and convert web pages to markdown. No public ingress — +# apps/api reaches it via localhost in dev, via mana-crawler:3014 +# hostname in the Docker network. +MANA_CRAWLER_URL=http://localhost:3023 # ============================================ # MAERCHENZAUBER PROJECT diff --git a/docker-compose.macmini.yml b/docker-compose.macmini.yml index 9d887aca8..c30d20660 100644 --- a/docker-compose.macmini.yml +++ b/docker-compose.macmini.yml @@ -1527,6 +1527,8 @@ services: MANA_SEARCH_URL: http://mana-search:3012 MANA_CREDITS_URL: http://mana-credits:3002 MANA_MEDIA_URL: http://mana-media:3011 + MANA_CRAWLER_URL: http://mana-crawler:3014 + MANA_LLM_DEFAULT_MODEL: ${MANA_LLM_DEFAULT_MODEL:-gemma3:4b} MANA_SERVICE_KEY: ${MANA_SERVICE_KEY} APP_ID: mana-api # Database (used by modules that have server-side state — research, diff --git a/package.json b/package.json index 94fb1fec0..da40d382e 100644 --- a/package.json +++ b/package.json @@ -220,7 +220,7 @@ "cf:projects:list": "npx wrangler pages project list", "cf:projects:create": "echo 'Creating Cloudflare Pages projects...' && npx wrangler pages project create chat-landing --production-branch=main && npx wrangler pages project create picture-landing --production-branch=main && npx wrangler pages project create mana-landing --production-branch=main && npx wrangler pages project create cards-landing --production-branch=main && npx wrangler pages project create quotes-landing --production-branch=main", "dev:search": "cd services/mana-search && go run ./cmd/server", - "dev:crawler": "cd services/mana-crawler && go run ./cmd/server", + "dev:crawler": "cd services/mana-crawler && DATABASE_URL=postgresql://mana:devpassword@localhost:5432/mana_platform go run ./cmd/server", "dev:notify": "cd services/mana-notify && go run ./cmd/server", "questions:dev": "turbo run dev --filter=questions...", "dev:questions:web": "pnpm --filter @questions/web dev", @@ -256,7 +256,7 @@ "dev:manavoxel:local": "concurrently -n sync,web -c magenta,cyan \"pnpm dev:sync\" \"pnpm dev:manavoxel:web\"", "dev:media": "cd services/mana-media/apps/api && bun run --hot src/index.ts", "dev:geocoding": "cd services/mana-geocoding && bun run --watch src/index.ts", - "dev:mana:servers": "concurrently -n auth,sync,api,media -c blue,magenta,yellow,green \"pnpm dev:auth\" \"pnpm dev:sync\" \"pnpm dev:api\" \"pnpm dev:media\"" + "dev:mana:servers": "concurrently -n auth,sync,api,media,crawler -c blue,magenta,yellow,green,cyan \"pnpm dev:auth\" \"pnpm dev:sync\" \"pnpm dev:api\" \"pnpm dev:media\" \"pnpm dev:crawler\"" }, "devDependencies": { "@mana/eslint-config": "workspace:*",