Installing Deckgauge

Four commands take a fresh clone to a running stack at http://localhost:3000. The order is not optional — the migration step runs against containers that are already up, not before them.

deckgauge · docker compose ps
postgres healthy
clickhouse healthy
keycloak Up — no healthcheck defined, realm imported
api starting — waits up to 90s before its first health check

Container health right after `docker compose up -d`, before migrations run.

Prerequisites

ToolVersion
Node.js20+
pnpm9+ (npm install -g pnpm@9)
Dockerlatest — Docker Desktop, Rancher Desktop, or any compatible engine

Deckgauge is a pnpm monorepo (this docs site is the one npm exception). Run every command below from the repository root.

How to install it

  1. cp .env.example .env — copies the environment template. The defaults work for a local install; see the configuration reference for what each variable does.
  2. pnpm install — installs dependencies for every app and package in the workspace.
  3. docker compose up -d — builds and starts every service: postgres, redis, clickhouse, keycloak-db, keycloak, api, web, and worker. See the services and how they fit together for what each one does.
  4. pnpm --filter @deckgauge/db migrate:deploy — applies the committed Prisma migrations against Postgres, creating the schema. This has to run after step 3 because Postgres has to be up and healthy first.

What happens on first boot

ClickHouse initializes its analytics schema from clickhouse/schemas/, mounted read-only into its docker-entrypoint-initdb.d — this only runs once, against a fresh volume. Keycloak's entrypoint processes keycloak/realm-export.json before the server starts: if the Microsoft SSO variables are all set it fills in the identity provider, otherwise it strips identity-provider config from the import entirely (see Keycloak and identity providers). The api and worker containers wait for postgres, redis, and clickhouse to report healthy before starting; web only waits for api to start, since it retries API calls at request time rather than blocking on a health check.

Verifying the stack is healthy

  1. Check container statusdocker compose ps should show every service as Up, with postgres, clickhouse, redis, keycloak-db, and api reporting healthy.
  2. Hit the API health checkcurl http://localhost:3001/health should return a success response.
  3. Open the apphttp://localhost:3000 should load the board and let you sign in through Keycloak (self-registration is enabled by default).

If it looks wrong

SymptomCauseFix
migrate:deploy fails to connectPostgres isn't up yet, or isn't healthyRun docker compose ps first and wait for postgres to show healthy, then retry
pnpm --filter @deckgauge/db migrate:dev fails with a shadow-database error (P3006)migrate:dev is not supported in this repoUse migrate:deploy for setup; for a new schema change, hand-write the migration SQL and apply it the same way
The API container keeps restartingIts healthcheck has a 90s start_period before the first check counts — a cold boot can look unhealthy brieflyGive it the full grace window before assuming it's broken; check docker compose logs api if it's still failing after that

More failure modes, including disk and memory pressure, are covered in Troubleshooting a self-hosted install.

Related

Last updated