Skip to content

fix(docker): correct compose example after actual e2e test#853

Merged
buremba merged 1 commit into
mainfrom
fix/docker-compose-example
May 18, 2026
Merged

fix(docker): correct compose example after actual e2e test#853
buremba merged 1 commit into
mainfrom
fix/docker-compose-example

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 18, 2026

Summary

Fixes two real bugs in the sample compose shipped in #850 that I should have caught before merging — applying the e2e-before-merge rule that #837 codified hours earlier. My bad.

Reproducer (the test #850 should have included)

cp docker-compose.example.yml /tmp/test/docker-compose.yml
cd /tmp/test
# Generate the two secrets per docs/DOCKER.md
sed -i '' "s|REPLACE_ME_openssl_rand_base64_32|$(openssl rand -base64 32)|"  docker-compose.yml  # ENCRYPTION_KEY
sed -i '' "0,/REPLACE_ME_openssl_rand_base64_32/{s/REPLACE_ME_openssl_rand_base64_32/$(openssl rand -base64 32)/}" docker-compose.yml  # BETTER_AUTH_SECRET
docker compose up -d

Before this fix

Container lobu-postgres Error dependency postgres failed to start
dependency failed to start: container lobu-postgres is unhealthy

Postgres logs (truncated):

Counter to that, there appears to be PostgreSQL data in:
  /var/lib/postgresql/data (unused mount/volume)
This is usually the result of upgrading the Docker image without
upgrading the underlying database...

And on Apple Silicon, even before postgres tries to start:

no matching manifest for linux/arm64/v8 in the manifest list entries

After this fix

Container lobu-postgres Healthy
Container lobu-app Started

Server logs end with:

{"port":8787,"msg":"Starting server"}
{"host":"0.0.0.0","port":8787,"msg":"Server running at http://0.0.0.0:8787"}

GET /healthz{"status":"ok",...}. GET / returns 3211 bytes of SPA HTML. All 16 bundled providers loaded, 22 migrations applied cleanly.

The two fixes

  1. Volume mount: lobu_pgdata:/var/lib/postgresql/datalobu_pgdata:/var/lib/postgresql. PG18+ uses major-version-specific subdirectories under the parent dir, so mounting /data directly conflicts with that layout and PG refuses to start. The user's original Docker deployment crashes with no error message — impossible to debug locally #766 compose had this right; I "fixed" it during docs: docker-compose example + self-hosting guide #850 and broke it.

  2. Apple Silicon platform: linux/amd64: the published image is amd64-only. Added a commented-out platform: line users can uncomment, plus a note in docs/DOCKER.md. Multi-arch image build is a follow-up.

Test plan

  • docker compose -f docker-compose.example.yml config validates after edits.
  • Real e2e: compose up → both containers healthy → GET /healthz 200 → GET / returns SPA → no errors in lobu-app logs.

Refs #766.

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.
@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 32 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: 92ca77fd-4f60-4e16-8076-425dcbc66b10

📥 Commits

Reviewing files that changed from the base of the PR and between ea4193e and 1691017.

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

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

@buremba buremba merged commit b95a35e into main May 18, 2026
18 checks passed
@buremba buremba deleted the fix/docker-compose-example branch May 18, 2026 02:24
@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!

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