[DS-36] Set up docker-compose dev containers (tests/typecheck + Storybook) #2

Merged
chris merged 2 commits from feature/DS-36 into main 2026-09-01 20:12:07 -06:00
Owner

Ticket

DS-36 Set up docker-compose dev containers (tests/typecheck + Storybook)

Summary

  • Adds Dockerfile.dev — a VS Code Dev Container image (bun, git, gh, tea, uv, native Claude Code CLI) trimmed from the irrigo/budget-tracker pattern, with the Android/Gradle/Expo toolchain and the Postgres/Mongo healthcheck dependency dropped (neither applies — this is a plain tsup-built component package with no API/app/DB split).
  • Adds docker-compose.yml with a dev service (sleep infinity, host ~/.claude/~/.claude.json/~/.gitconfig/~/.ssh + VS Code Server mounts, used for bun run test / bun run typecheck) and a storybook service (publishes STORYBOOK_PORT, profile-gated so it stays out of a bare docker compose up -d — it has nothing to run until Storybook is configured in a separately-tracked ticket).
  • Adds .env.example documenting COMPOSE_PROJECT_NAME, DEV_USER/DEV_UID/DEV_GID, FORGEJO_TOKEN, PRIMARY_GIT_DIR, STORYBOOK_PORT, and DOCKER_SUBNET, plus a worktree-offset table.
  • Adds a short "Local development" section to CLAUDE.md.

Two deliberate deviations from the original plan, both verified against the real host/toolchain rather than assumed:

  • bun install --frozen-lockfile --ignore-scripts (image build layer and ENTRYPOINT), instead of a plain bun install --frozen-lockfile. This package's package.json runs tsup via a prepare lifecycle script, and the manifest-only COPY layer has no src//tsup.config.ts yet, so tsup fails with "No input files." Dev-container tasks (bun run test, bun run typecheck) never need the built dist/, so skipping the build here is safe.
  • A pinned, parameterized DOCKER_SUBNET (.env.example, default 10.89.0.0/24, referenced in docker-compose.yml) instead of letting Compose auto-assign a subnet. This host's entire set of Docker default address pools (172.17-172.31/16 and 192.168.0-240/20) is already fully allocated across the other stacks running here, so auto-assignment fails outright. Parameterized (not hardcoded) so a worktree stack can override it to a distinct block — verified two stacks pinning the same subnet fail to come up together.

Went through a pre-PR review pass that surfaced 8 findings (missing FORGEJO_TOKEN plumbing to dev, a storybook restart-loop, the worktree subnet collision, a few doc/convention cleanups) — all addressed in a follow-up commit and re-verified; a scoped follow-up review came back merge-ready.

Out of scope per the ticket (tracked separately): configuring Jest/Storybook themselves, and CI wiring.

## Ticket [DS-36](http://192.168.2.100:7123/home/browse/DS-36/) Set up docker-compose dev containers (tests/typecheck + Storybook) ## Summary - Adds `Dockerfile.dev` — a VS Code Dev Container image (bun, git, gh, tea, uv, native Claude Code CLI) trimmed from the irrigo/budget-tracker pattern, with the Android/Gradle/Expo toolchain and the Postgres/Mongo healthcheck dependency dropped (neither applies — this is a plain tsup-built component package with no API/app/DB split). - Adds `docker-compose.yml` with a `dev` service (`sleep infinity`, host `~/.claude`/`~/.claude.json`/`~/.gitconfig`/`~/.ssh` + VS Code Server mounts, used for `bun run test` / `bun run typecheck`) and a `storybook` service (publishes `STORYBOOK_PORT`, profile-gated so it stays out of a bare `docker compose up -d` — it has nothing to run until Storybook is configured in a separately-tracked ticket). - Adds `.env.example` documenting `COMPOSE_PROJECT_NAME`, `DEV_USER`/`DEV_UID`/`DEV_GID`, `FORGEJO_TOKEN`, `PRIMARY_GIT_DIR`, `STORYBOOK_PORT`, and `DOCKER_SUBNET`, plus a worktree-offset table. - Adds a short "Local development" section to `CLAUDE.md`. Two deliberate deviations from the original plan, both verified against the real host/toolchain rather than assumed: - **`bun install --frozen-lockfile --ignore-scripts`** (image build layer and `ENTRYPOINT`), instead of a plain `bun install --frozen-lockfile`. This package's `package.json` runs `tsup` via a `prepare` lifecycle script, and the manifest-only COPY layer has no `src/`/`tsup.config.ts` yet, so `tsup` fails with "No input files." Dev-container tasks (`bun run test`, `bun run typecheck`) never need the built `dist/`, so skipping the build here is safe. - **A pinned, parameterized `DOCKER_SUBNET`** (`.env.example`, default `10.89.0.0/24`, referenced in `docker-compose.yml`) instead of letting Compose auto-assign a subnet. This host's entire set of Docker default address pools (172.17-172.31/16 and 192.168.0-240/20) is already fully allocated across the other stacks running here, so auto-assignment fails outright. Parameterized (not hardcoded) so a worktree stack can override it to a distinct block — verified two stacks pinning the same subnet fail to come up together. Went through a pre-PR review pass that surfaced 8 findings (missing `FORGEJO_TOKEN` plumbing to `dev`, a `storybook` restart-loop, the worktree subnet collision, a few doc/convention cleanups) — all addressed in a follow-up commit and re-verified; a scoped follow-up review came back merge-ready. Out of scope per the ticket (tracked separately): configuring Jest/Storybook themselves, and CI wiring.
chris merged commit 5fa2d6b572 into main 2026-09-01 20:12:07 -06:00
chris deleted branch feature/DS-36 2026-09-01 20:12:07 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chris/design-system!2
No description provided.