1 line
7.9 KiB
JSON
1 line
7.9 KiB
JSON
{"repo": "7dracoder/geo-nyc", "files": {"render.yaml": {"1593d1e45bebba962250c67f91828e64f0dba803": {"t": 1785674403.8396165, "n": 7720, "h": "095a63a6e39104da", "c": "# Render blueprint for geo-nyc.\n#\n# One-click deploy: push this file, then visit\n# https://dashboard.render.com/iacs and pick this repo. Render will read\n# this file and create the services below.\n#\n# Two services:\n# - geo-nyc-api : FastAPI backend (Python, Groq Llama, RBF/synthetic mesh)\n# - geo-nyc-web : Next.js frontend (Node)\n#\n# Both ship from the same repo. The frontend's NEXT_PUBLIC_API_BASE_URL\n# is wired to point at the backend's public URL automatically.\n#\n# Free tier caveats (read these before relying on the demo):\n# - Web services spin down after ~15 min of inactivity. First request\n# after spin-down takes ~50s while the service boots.\n# - The free tier has *no persistent disk*. Anything the backend\n# writes under /var/data is wiped on every cold start. Seeded runs\n# disappear unless you either (a) attach a paid persistent disk and\n# uncomment the `disk:` block on the api service below, or (b)\n# re-run `make seed-runs` after each restart (idempotent).\n#\n# Region note: pick \"oregon\" or \"frankfurt\" for free tier; the others\n# are paid. Groq's data center routing handles latency on its side.\n# Both services should sit in the same region to keep the API call from\n# the SSR layer cheap.\n\nservices:\n # =====================================================================\n # Backend — FastAPI\n # =====================================================================\n - type: web\n name: geo-nyc-api\n runtime: python\n plan: free\n region: oregon\n branch: main\n rootDir: .\n buildCommand: pip install --upgrade pip && pip install -e .\n startCommand: uvicorn api.main:app --host 0.0.0.0 --port $PORT\n healthCheckPath: /api/health\n autoDeploy: true\n\n envVars:\n # --- Python runtime ---------------------------------------------\n # The project pins Python to 3.12 in pyproject.toml; matching that\n # avoids cibuildwheel surprises when pip resolves numpy/scipy.\n - key: PYTHON_VERSION\n value: 3.12.7\n\n # --- LLM provider ------------------------------------------------\n # Default ships in *fixture-only* mode: GEO_NYC_USE_FIXTURES=true\n # below makes every run serve pre-baked extractions and meshes,\n # which means the LLM is never actually called. We point the\n # provider at \"ollama\" instead of \"groq\" because the Groq client\n # refuses to start without an API key — and we deliberately keep\n # API keys *out* of this file (anything committed to a public\n # repo is auto-revoked by Groq's secret scanner). Ollama doesn't\n # need a key; the /api/llm/health probe will simply report it as\n # unreachable on Render, which is fine because no run path\n # depends on it.\n #\n # >>> Want real LLM-driven PDF extraction instead of fixtures? <<<\n # Two-step upgrade, performed entirely in the Render dashboard\n # (no code changes required):\n # 1. Edit this service's env vars:\n # GEO_NYC_LLM_PROVIDER = groq\n # GEO_NYC_GROQ_API_KEY = <your gsk_... key>\n # GEO_NYC_USE_FIXTURES = false\n # 2. Trigger a manual redeploy.\n - key: GEO_NYC_LLM_PROVIDER\n value: ollama\n - key: GEO_NYC_GROQ_BASE_URL\n value: https://api.groq.com/openai/v1\n - key: GEO_NYC_GROQ_MODEL\n value: llama-3.3-70b-versatile\n - key: GEO_NYC_LLM_TIMEOUT_SECONDS\n value: \"120\"\n\n # --- API server --------------------------------------------------\n # Render injects $PORT and exposes the service at $RENDER_EXTERNAL_URL.\n # `Settings.public_base_url` defaults to that URL automatically so\n # run manifests stamp absolute /static/exports URLs the Vercel\n # frontend can proxy to without manual copy-paste.\n - key: GEO_NYC_API_HOST\n value: 0.0.0.0\n - key: GEO_NYC_DEBUG\n value: \"false\"\n\n # --- CORS --------------------------------------------------------\n # Allow the Render-hosted frontend (geo-nyc-web), the legacy Vercel\n # deployment + previews, and local dev. The regex covers both\n # *.onrender.com and *.vercel.app variants.\n - key: GEO_NYC_CORS_ORIGINS\n value: https://geo-nyc-web.onrender.com,https://geo-nyc.vercel.app,http://localhost:3000,http://localhost:5173\n - key: GEO_NYC_CORS_ORIGIN_REGEX\n value: ^https://geo-nyc(-[a-z0-9-]+)?\\.(vercel\\.app|onrender\\.com)$\n\n # --- Pipeline toggles -------------------------------------------\n - key: GEO_NYC_USE_FIXTURES\n value: \"true\"\n - key: GEO_NYC_ENABLE_GEMPY\n value: \"false\"\n - key: GEO_NYC_LOG_LEVEL\n value: INFO\n\n # --- Storage roots ----------------------------------------------\n # Render's free tier doesn't grant write access to /var/data\n # (that path only exists when a paid persistent disk is mounted\n # there). We use repo-relative paths instead — pydantic resolves\n # them against REPO_ROOT, which on Render is\n # /opt/render/project/src — that directory is writable by the\n # service user, just ephemeral (wiped on every cold start).\n #\n # If you upgrade to a paid plan and mount the optional `disk:`\n # block below, change every value here to /var/data/<subdir> so\n # writes target the persistent mount.\n - key: GEO_NYC_DATA_DIR\n value: data\n - key: GEO_NYC_DOCUMENTS_RAW_DIR\n value: data/documents/raw\n - key: GEO_NYC_DOCUMENTS_EXTRACTED_DIR\n value: data/documents/extracted\n - key: GEO_NYC_RUNS_DIR\n value: data/runs\n - key: GEO_NYC_EXPORTS_DIR\n value: data/exports\n - key: GEO_NYC_FIELDS_DIR\n value: data/fields\n - key: GEO_NYC_CACHE_DIR\n value: data/cache\n\n # --- Persistent disk (OPTIONAL — paid feature) ----------------------\n # Uncomment to keep seeded runs across cold starts. Costs ~$1/mo for\n # 1 GB on Render's standard plan tier. Free plan ignores `disk:`.\n # If you enable this, also rewrite the GEO_NYC_*_DIR values above to\n # absolute /var/data/<subdir> paths so writes target the mount.\n #\n # disk:\n # name: geo-nyc-data\n # mountPath: /var/data\n # sizeGB: 1\n\n # =====================================================================\n # Frontend — Next.js\n # =====================================================================\n # Builds and runs the Next.js app from `apps/web`. NEXT_PUBLIC_*\n # variables are baked into the JS bundle at build time, so changing\n # them later requires a redeploy (Render's \"Manual Deploy\" button or\n # a fresh push triggers it).\n - type: web\n name: geo-nyc-web\n runtime: node\n plan: free\n region: oregon\n branch: main\n rootDir: apps/web\n buildCommand: npm ci && npm run build\n startCommand: npm run start -- -p $PORT -H 0.0.0.0\n healthCheckPath: /\n autoDeploy: true\n\n envVars:\n - key: NODE_VERSION\n value: \"20.18.0\"\n\n # The Next app reads this at build time to (a) generate\n # /geo-nyc-proxy/* rewrites in next.config.ts and (b) drive\n # client-side fetches via apps/web/src/lib/api.ts. We hardcode\n # the predictable Render URL of the api service in the same\n # blueprint — Render free-tier URLs follow\n # https://<service-name>.onrender.com so this is deterministic.\n # Override in the dashboard if you renamed the api service.\n - key: NEXT_PUBLIC_API_BASE_URL\n value: https://geo-nyc-api.onrender.com\n\n# No envVarGroups needed: the default deploy ships in fixture-only\n# mode, which doesn't require any secrets. Enabling real LLM\n# extraction is a dashboard-only opt-in (see the comment block on\n# GEO_NYC_LLM_PROVIDER in the api service above).\n"}}}} |