cp .env.example .env
docker compose up --build
# Optional local provider:
docker compose --profile ollama up --build
docker compose exec ollama ollama pull sqlcoderOpen web at http://localhost:4028, API docs at http://localhost:8000/docs, and check /health then /ready. The default Compose flags disable vector features; configure a provider for generation. Compose credentials are local-only examples.
- Push this repository to GitHub. In Render choose New → Blueprint, connect that repository, and select
render.yaml. - Review creation of
querymind-postgres,querymind-api, andquerymind-web. Select paid plans where the Blueprint/free availability differs for your account or region. - Before deploying the API, enter the Groq key only in the non-synced
LLM_API_KEYfield. The Blueprint sets the hosted base URL, primary model, and fallback model; no key is stored in Git. A Render service cannot reach Ollama on a developer laptop. - Set
CORS_ALLOW_ORIGINSon the API to the final HTTPS web origin, without a trailing slash. - Deploy the API. On the free tier, the API start command runs
alembic upgrade headbefore starting Uvicorn because Render does not support pre-deploy commands for free services. Confirmhttps://<api-host>/healthand/ready. - Set
NEXT_PUBLIC_API_URLonquerymind-webtohttps://<api-host>/api/v1, then trigger a clean frontend deploy. Render does not provide a supported Blueprint interpolation from another web service’s eventual public hostname into a Next.js build variable; this manual build-time step is required. - Open the web service and run a safe demo question. Seed demo tables separately from Render Shell with
psql "$DATABASE_URL" -f scripts/seed_data.sqlfromapps/apiif the database is empty. - Keep external connections disabled. For production, create/review a least-privilege reader role and change the query execution connection design so application metadata migrations and query traffic do not share broad credentials.
The Blueprint keeps local embedding features disabled because the standard API build omits the large SentenceTransformer runtime. To enable them, change the API build command to pip install -r requirements-embeddings.txt, provision adequate memory, then set the feature flags true. Groq announced free/developer-tier retirement of llama-3.3-70b-versatile for August 16, 2026; replace LLM_FALLBACK_MODEL before that date if the deployment is affected.
Build filters deploy the API for backend/shared deployment changes and the web for frontend/shared deployment changes. render.yaml contains no real API keys. This repository has been prepared and syntax-checked locally; no Render account or live deployment has been connected by this work.
Use Render deploy rollback for application revisions. Database downgrade scripts are intentionally conservative; test backups and migrations in staging. Monitor 5xx rates, provider latency, validation rejections, query duration, and database statement cancellations without logging secrets or raw credentials.