{"id":1732,"date":"2026-05-05T02:48:30","date_gmt":"2026-05-04T19:48:30","guid":{"rendered":"https:\/\/daiilynews.cu.ma\/shipping-tanstack-start-and-bun-to-railway\/"},"modified":"2026-05-05T02:48:30","modified_gmt":"2026-05-04T19:48:30","slug":"shipping-tanstack-start-and-bun-to-railway","status":"publish","type":"post","link":"https:\/\/daiilynews.cu.ma\/?p=1732","title":{"rendered":"Shipping TanStack Start and Bun to Railway"},"content":{"rendered":"<p> <br \/>\n<br \/>\n                Railway&#8217;s Nixpacks autobuild detects Bun projects fine, but it can&#8217;t sequence the combination this site needs: prisma generate at build time, Vite + the TanStack Start plugin, a custom server.ts entry, and prisma migrate deploy on boot. A four-stage Dockerfile is simpler than teaching Nixpacks all of that.<\/p>\n<p>The full post walks through the recipe: two parallel bun install stages (one full, one production-only), a build stage that runs prisma generate against a dummy DATABASE_URL, a lean runtime that layers the generated Prisma client on top of deps-prod&#8217;s node_modules, and an entrypoint that runs migrations before exec-ing into Bun so the container&#8217;s PID 1 shuts down cleanly on Railway&#8217;s SIGTERM.<\/p>\n<p>Plus the small Railway-side bits: how to wire the Postgres reference variable, why you should bind explicitly to 0.0.0.0, and the COPY-order detail that determines whether your runtime sees the right Prisma client.<\/p>\n<p>Originally published at andreasbergstrom.dev \u2014 read the full post there.<\/p>\n<p><br \/>\n<br \/><a href=\"https:\/\/dev.to\/andreasbergstrom\/shipping-tanstack-start-and-bun-to-railway-2o7k\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Railway&#8217;s Nixpacks autobuild detects Bun projects fine, but it can&#8217;t sequence the combination this site needs: prisma generate at build time, Vite + the TanStack Start plugin, a custom server.ts entry, and prisma migrate deploy on boot. A four-stage Dockerfile is simpler than teaching Nixpacks all of that. The full post walks through the recipe: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1733,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[676],"tags":[758,761,765,762,757,763,764,756,760,759],"class_list":["post-1732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-ai","tag-bunjs","tag-coding","tag-community","tag-development","tag-docker","tag-engineering","tag-inclusive","tag-railway","tag-software","tag-tanstack"],"_links":{"self":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts\/1732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1732"}],"version-history":[{"count":0,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts\/1732\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/media\/1733"}],"wp:attachment":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}