Skip to content
Nibiru docsv0.9.2

Deploying the Docs Site

Production deployment of nibiru-framework.com using jwilder/nginx-proxy and your own Ollama on your Ollama instance.

Stable Reading time ~ 3 min Edit on GitHub

This page documents how the docs site is deployed in production. The setup uses jwilder/nginx-proxy for automatic Docker container routing, letsencrypt-nginx-proxy-companion for HTTPS, and your own Ollama at your-ollama-host.example for the Oracle backend — no paid LLM API keys required.

Internet
┌──────────────────────┐
│ jwilder/nginx-proxy │ ← reverse proxy on :80 / :443
│ (network: nginx-proxy)│ terminates TLS
└──────────┬───────────┘
│ http://nibiru-docs:4321
┌──────────────────────┐ ┌──────────────────────┐
│ nibiru-docs │ ──────▶ │ your-ollama-host.example │
│ Astro Node SSR :4321 │ HTTPS │ Ollama (5× GPU) │
│ Oracle endpoint │ │ qwen2.5-coder:14b │
└──────────────────────┘ │ nomic-embed-text │
└──────────────────────┘
Terminal window
# 1) Create the shared external network (one time)
docker network create nginx-proxy
# 2) Run nginx-proxy + acme-companion (one time)
# See https://github.com/nginx-proxy/nginx-proxy for the canonical compose.
# 3) Pull the Oracle's models on your Ollama instance (one time)
curl https://your-ollama-host.example/api/pull -d '{"name":"qwen2.5-coder:14b"}'
curl https://your-ollama-host.example/api/pull -d '{"name":"nomic-embed-text"}'
FilePurpose
DockerfileMulti-stage build: builds Oracle index against your Ollama instance, builds Astro, prunes dev deps.
docker-compose.ymlProduction — VIRTUAL_HOST=nibiru-framework.com, joined to nginx-proxy network.
docker-compose.local.ymlLocal-test override — exposes 4321:4321, drops nginx-proxy env vars.
.dockerignoreKeeps node_modules, .git, etc. out of the build context.
.env.exampleTemplate — defaults to Ollama on your Ollama instance, no API keys required.
Terminal window
cd docs
cp .env.example .env
# defaults are fine for production unless you want to override the Ollama URL or models
docker compose up -d --build

The first build runs build-oracle-index.mjs to embed the docs against your Ollama. Subsequent rebuilds are fast — Docker caches the dep layer; only changed chunks need re-embedding.

After ~30 seconds, jwilder/nginx-proxy picks up the new container, requests a Let’s Encrypt cert, and routes https://nibiru-framework.com:4321.

Terminal window
curl -s https://nibiru-framework.com/api/oracle | jq
# {
# "status": "ok",
# "llm": { "provider": "ollama", "model": "qwen2.5-coder:14b", … },
# "embed": { "provider": "ollama", "model": "nomic-embed-text", … },
# "index": { "present": true, "chunks": 177, … }
# }

Or open the site in a browser, click the amber Oracle launcher, and ask a question.

Terminal window
git pull
docker compose up -d --build

The build re-runs the Oracle index against the freshest content; the new container starts on :4321; jwilder swaps the upstream; the old container is stopped — no noticeable downtime.

VarDefaultUsed atPurpose
LLM_PROVIDERollamaruntimeollama (default) or anthropic.
OLLAMA_BASE_URLhttps://your-ollama-host.examplebuild + runtimeWhere to reach Ollama.
OLLAMA_CHAT_MODELqwen2.5-coder:14bruntimeChat-completion model.
OLLAMA_EMBED_MODELnomic-embed-textbuild + runtimeEmbedding model.
EMBED_PROVIDERollamabuild + runtimeollama or openai.
ANTHROPIC_API_KEYruntimeOnly used if LLM_PROVIDER=anthropic.
ANTHROPIC_MODELclaude-haiku-4-5-20251001runtimeOverride Claude model.
OPENAI_API_KEYbuild + runtimeOnly used if EMBED_PROVIDER=openai.
ORACLE_TOP_K6runtimeChunks injected per Oracle response.
LETSENCRYPT_EMAILstephan.kasdorf@bittomine.comletsencryptWhere Let’s Encrypt sends expiry notices.
VIRTUAL_HOSTnibiru-framework.com,www.nibiru-framework.comnginx-proxySet in compose.

502 Bad Gateway. The upstream container failed to start. Check docker logs nibiru-docs — likely missing build artifact in dist/server/entry.mjs.

Cert not issued. Let’s Encrypt rate-limits aggressively. Check docker logs letsencrypt-nginx-proxy-companion for the cause.

Oracle answers without citations. The embedding index is empty. Either nomic-embed-text isn’t pulled on Ollama, or the build couldn’t reach your Ollama instance. Re-pull the model:

Terminal window
curl https://your-ollama-host.example/api/pull -d '{"name":"nomic-embed-text"}'
docker compose up -d --build

Oracle returns “the Oracle could not answer”. Check the chat model is pulled:

Terminal window
curl https://your-ollama-host.example/api/tags | jq '.models[].name'

Want to fall back to Claude. Set LLM_PROVIDER=anthropic and ANTHROPIC_API_KEY in .env, then docker compose up -d.

IdleUnder Oracle load
RAM~120 MB~200 MB
CPU< 0.5%~5%
Networkminimalone HTTPS round-trip per question
Disk~60 MB image + ~5 MB index+ corpus exports

A 1 GB / 1 vCPU droplet handles the docs site comfortably alongside other services. The heavy lifting (LLM inference) happens on your GPU cluster, not the docs container.