Deploy specific pNPM Turborepo workspace that is run on Bunjs
Hello all!
I am attempting to deploy a single pNPM-based Turborepo project (is that what they are called?,
apps/api
that is currently using a start command that relies on Bunjs being available in the current context (pnpm with-env bun run src/index.ts
). That command works locally but I can't seem to get it to work on Railway. What would be the easiest way to get Bun on the container so it can run like this, or is this a bad method and there is a simpler way that I am missing.Solution:Jump to solution
add it as a nix package, add this to a nixpacks.toml file
```toml
[phases.setup]
nixpkgsArchive = '231b230513b81db80821be631f2e395e26a21f16'
nixPkgs = ['...', 'bun']...
19 Replies
Project ID:
N/A
N/A
Solution
add it as a nix package, add this to a nixpacks.toml file
ref: https://github.com/NixOS/nixpkgs/commit/231b230513b81db80821be631f2e395e26a21f16
ok dope
thanks fellow canadian who laughed at nintendo's silly signup form
should i leave the ...
alright thanks
appreciate you
did it work?
...havent tested it yet π
haha well that is 100% how you add bun, but there always could be additional config needed
nws
i will report here my results
just in case it ends up not working
sounds good
alright it built successfully but im getting 'application failed to respond' - im assuming this is because i set my port wrong so i updated it and we shall see...
yea was just reading that haha
does it have to be 0.0.0.0 or can it be
::
?
(using fastify)::
works yepalright sounds good
still getting application failed to respond - i set a PORT env var to 3001 (where the application is listening) and the host to 0.0.0.0 in fastify yet still no luck
oop nvm shes working
just took a second
all set?
yep all set
thanks a bunch
no problem π