4 Replies
2 years ago
N/A
2 years ago
I think it's 1.0.11
2 years ago
1.0.11 is not the latest though
2 years ago
to use the latest bun version you have to specify the nix archive to use, add this to a nixpacks.toml file in your project.
[phases.setup]
nixpkgsArchive = '5d99e55bbb7e90eef294e7796197ba3cb857cd9e'
reference:
2 years ago
I thought they updated it:
2 years ago
new bun versions come out like every other day lol
2 years ago
as of writing this, the nixpacks.toml above will use bun 1.0.14
2 years ago
oh okay
2 years ago
Altight thank for your help!
2 years ago
ive updated my message above, when i wrote it the version was 1.0.13, ive updated the commit id to use bun 1.0.14
2 years ago
note that's still not the latest, if you always need the latest you'll want to move to a Dockerfile based build
2 years ago
Do you have an example of an Dockerfile?
2 years ago
Never used it before.
2 years ago
i do, but i make no promises that it will work out the gate for you
FROM oven/bun:canary
WORKDIR /app
COPY assets /app/assets
COPY src /app/src
COPY bun.lockb package.json tsconfig.json /app/
RUN apt-get update && apt-get install unzip
# Ensure we're 100% on the newest version
RUN bun upgrade --canary
RUN bun i
CMD bun run start
2 years ago
Thank you!
2 years ago
give this a read when you need to
2 years ago
I will for sure, thanks again brody!
2 years ago
It works, gives me the latest version of bun!
2 years ago
wow that was easy, I put that disclaimer in because I thought it wouldn't work without some modifications
2 years ago
Haha it does work, just removed COPY assets /app/assets
beacuse i dont have an assets folder. But yeah gives me v1.0.16
2 years ago
awesome
a year ago
For future readers, you can also use the latest commit like so
[phases.setup]
nixpkgsArchive = 'master'
a year ago
@lasse I would just dockerize your application and use the bun image in there. This would streamline your deployment to Railway!
a year ago
Brody, am I understanding correctly that it is impossible to pin to a specific Bun version with Railway's nix implementation?
I'd like to avoid the overhead of dockerizing if possible. All we need is to be able to specify bun version.
a year ago
you can find the nixpacks comments here to be used as an archive - https://github.com/NixOS/nixpkgs/commits/master/pkgs/development/web/bun/default.nix
7 months ago
I'm using the bun nix pkg and I'm a bit confused what to do to use the latest Bun version. I don't see any updates in the url you linked @brody recently, this update came out a week ago or so. What should I do here? This new version in particular I need to use for the S3 client.
7 months ago
They changed the URL format it would seem, please try dayblox's suggestion.