4 months ago
fb881bcThree 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