fix: repair the one-command self-host stack#115
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
docker compose up— the promise on the front page of the README — was broken. Replacing the placeholder web app with Next.js in #113 left the container wiring pointing at the old app, and I verified that work locally withnext startinstead of verifying the stack. That was the wrong check.What was broken
webDocker target rannode apps/web/dist/index.js, a file deleted in feat: add dashboard with github auth, onboarding and runs list #113. Next builds to.next, so the container exited immediately.webhealthcheck probed/health, a route the Next app never had.webservice had no auth environment, so even a running container could not sign anyone in.HEARTBEAT_INTERVAL_MS, left over from the placeholder; the real worker readsPOLL_INTERVAL_MS.Fixes
webnow builds with Next'sstandaloneoutput and runsserver.js; the Dockerfile copies only the standalone bundle and static assets./healthroute.AUTH_SECRET(required, with a message telling you how to generate one), the GitHub OAuth pair,AUTH_URLandAUTH_TRUST_HOST.AUTH_SECRETand explains the OAuth app and the bootstrap behaviour.Found only because the stack was actually started this time
wget localhostinside Alpine resolves::1first while the servers bind IPv4, so both services reportedunhealthyforever. It went unnoticed because nothing depends on the API's health condition. Both healthchecks now use127.0.0.1.web#typecheckran concurrently with its ownbuild, but the app's tsconfig includes the.next/typesthatbuildgenerates — so typecheck intermittently failed on a missing generated module. Reproduced in one run out of two. Fixed with a package-level turbo config makingtypecheckdepend onbuild; verified with four consecutive clean runs after deleting.nexteach time.outputs: ["dist/**"]while Next writes.next.Verification
Brought the whole stack up on a clean volume: every service reports healthy, and the containerized dashboard renders the seeded runs and the flaky board (scores 0.86 / 0.75 / 0.58). Four tests cover the adoption rule, including that it refuses an org someone already owns.
42/42 turbo tasks, 132 tests.