Repository navigation
feat(self-host): one-command Docker Compose stack (Postgres + API + dashboard) - #831
Merged
Merged
Conversation
…l for fast startup)
…API Dockerfile claims; evaluator gets email env
Merged
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.
Closes #827.
What
A one-command self-host stack in
selfhost/:selfhost/docker-compose.ymlrunspostgres:16-alpine, theapiand thedashboard.apps/api/Dockerfile, unchanged, run withuser: node. It already runsprisma migrate deploybefore it listens.selfhost/dashboard.Dockerfile.depends_onwaits for each healthcheck, so the start order is Postgres, then the API, then the dashboard.alert-rules-evaluatorsits behind--profile jobs. It reuses the API image, so there's no new service type.selfhost/dashboard.Dockerfileis a multi-stage Next.js standalone build that runs asnode. It comes to 357 MB, against 1.06 GB for the production image.next.config.tssetsoutput: "standalone"only whenNEXT_OUTPUT=standalone, which only this Dockerfile sets. The Railway dashboard build andnext startare unchanged.selfhost/.env.example: no default secrets. Compose uses${VAR:?}forPOSTGRES_PASSWORD,CHECKIN_ENCRYPTION_KEYandDASHBOARD_API_SECRET, souprefuses to start until they're set. The.envfile is gitignored and dockerignored.127.0.0.1by default (BIND_ADDRESSto change it). Signup is invite-only after the first account unless you opt in.apps/api/Dockerfilehas existed since v1.18.5.Measured on the box (2026-10-19, 8 vCPU / 15.6 GiB, Docker 26.1.5, Compose 2.26.1)
docker compose up -dreturnsup@telemetry-tracker/node1.4.1 event was on the dashboard Events page 7.5 s after the SDK started (the SDK has a 5 s batch interval).docker stats, 5 min after the last activity. API 77 MiB, dashboard 119 MiB, Postgres 65 MiB: 261 MiB total, CPU mean 0.4% of one core.start_interval) and every 60 s once healthy.node, the migrations applied, and the jobs profile anddocker compose exec api node dist/jobs/run-retention.jsboth work.Checks:
docker compose configis valid, eslint on the changed files passes, and dashboard vitest is 355/355.