Skip to content

docs: docker-compose example + self-hosting guide#850

Merged
buremba merged 1 commit into
mainfrom
docs/docker-quickstart
May 18, 2026
Merged

docs: docker-compose example + self-hosting guide#850
buremba merged 1 commit into
mainfrom
docs/docker-quickstart

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 18, 2026

Summary

Closes the documentation gap that surfaced in #766. Adds:

  • docker-compose.example.yml at repo root — copy, generate two secrets, docker compose up -d, done.
  • docs/DOCKER.md — what's actually required at boot vs nice-to-have, boot-error troubleshooting, provider story, production checklist.
  • .env.example rewritten — drops the misleading "CLAUDE CONFIGURATION (Required)" header, replaces it with a clear "Required to boot" section listing only DATABASE_URL, ENCRYPTION_KEY, BETTER_AUTH_SECRET. All LLM provider keys explicitly marked optional.

Why now

External user (#766) tried to docker-compose up against ghcr.io/lobu-ai/lobu-app and hit {"level":"error","msg":"Failed to start server","error":{}} — empty error. PR #843 fixed the empty-error logging. This commit fills the remaining gap: they should not have needed to debug a server error to find out that ENCRYPTION_KEY exists. Now they don't.

Notable corrections

The old .env.example claimed ANTHROPIC_API_KEY was "Required" — it's not. The server boots fine without any provider keys, and per-provider keys can be added at runtime via the admin UI. Reality (verified by reading packages/server/src/server.ts:main()):

Var Required?
DATABASE_URL yes, explicit throw
ENCRYPTION_KEY yes, secrets in DB can't decrypt without it
BETTER_AUTH_SECRET yes for Docker/k8s (ephemeral default only in lobu run local CLI mode)
ANTHROPIC_API_KEY / OPENAI_API_KEY / etc. no

Test plan

  • Sample compose validates with docker compose -f docker-compose.example.yml config.
  • Smoke test: cp the example, generate the two secrets, docker compose up -d, open localhost:8787, sign in. (Untested locally — flagging so a reviewer or follow-up can confirm before sharing the file externally.)
  • .env.example still parseable as .env (no syntax surprises).

Refs #766.

External user (#766) tried docker-compose against the published
ghcr.io/lobu-ai/lobu-app image, missing required env (ENCRYPTION_KEY,
BETTER_AUTH_SECRET) and unable to debug because the boot error logged
as empty `{}`. PR #843 fixed the error logging. This commit fills the
remaining gap: a working sample compose, a self-hosting doc that
spells out what's actually required vs optional, and a .env.example
that no longer claims ANTHROPIC_API_KEY is required.

Image itself is unchanged (already generic enough). Documents the
provider-agnostic reality: 17 providers in config/providers.json,
no env-var required at boot for any of them, runtime provisioning
via admin UI works fine.

Refs #766.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@buremba has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minute and 42 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e02113ff-399b-4c4c-af66-f7116bc05968

📥 Commits

Reviewing files that changed from the base of the PR and between 16998ab and fa27610.

📒 Files selected for processing (3)
  • .env.example
  • docker-compose.example.yml
  • docs/DOCKER.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/docker-quickstart

Comment @coderabbitai help to get the list of available commands and usage tips.

@buremba buremba merged commit 50ed164 into main May 18, 2026
18 checks passed
@buremba buremba deleted the docs/docker-quickstart branch May 18, 2026 02:11
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

buremba added a commit that referenced this pull request May 18, 2026
End-to-end smoke test against the published ghcr.io/lobu-ai/lobu-app
image (PR #850's sample compose) surfaced two issues:

1. `/var/lib/postgresql/data` mount fails on pgvector:pg18-trixie —
   PG18+ rejects /data subdir as "unused mount/volume" and refuses to
   start. The correct mount is the parent dir /var/lib/postgresql.
   This was in the user's original #766 compose and I broke it during
   #850; reverting.

2. The published image is amd64-only — Apple Silicon users hit
   "no matching manifest for linux/arm64" on `docker compose up`.
   Add a commented-out `platform: linux/amd64` line they can
   uncomment to run via Rosetta, plus a note in docs/DOCKER.md.
   Multi-arch build is a follow-up.

E2E verified after these fixes: containers boot cleanly, migrations
applied, 16 providers loaded, `GET /healthz` → `{"status":"ok"}`,
`GET /` returns the admin SPA HTML.

Refs #766.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants