Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(deploy): containerize api, worker, web for Railway (unit 1)

4 months ago

fb881bc
Authored
grim7/13/2026, 11:29:28 PM
Three Dockerfiles built from the monorepo root. api + worker run TypeScript
directly on oven/bun:1.3-slim; web builds under Bun and serves under node:22
(nitro SSR runtime is Node, so NITRO_PRESET=node-server is forced — an
un-forced build emits a Bun.serve bundle that dies under node). VITE_SITE_URL
is a build ARG (import.meta.env, inlined); all other web env is runtime.

Bun installs are not --production (that drops the @tripwire/* workspace
symlinks); the runtime stage copies the whole installed tree then overlays
source, preserving bun's nested per-workspace node_modules.

PORT handling: api binds PORT ?? API_PORT ?? 8787 (Railway injects PORT per
isolated service). New worker /healthz (Bun.serve on PORT ?? WORKER_HEALTH_PORT
?? 8181) so a dead consumer is visible to Railway's healthcheck.

Verified against the compose Postgres: all three images build + boot; api/worker
/healthz return ok; web serves; api exits 1 without BETTER_AUTH_SECRET in
production. docker-compose.yml unchanged — local dev untouched.

Parent39957ef

8 files changed
  • .dockerignore+23−0
  • DECISIONS.md+49−0
  • all-summaries.md+20−0
  • apps/api/Dockerfile+39−0
  • apps/api/src/index.ts+4−1
  • apps/web/Dockerfile+44−0
  • apps/worker/Dockerfile+39−0
  • apps/worker/src/index.ts+27−0