Switched back to bun as package manager, do I still need it in nixpacks.toml?

developerharrisHOBBY

a year ago

    nixpkgsArchive = 'f53263caceb5f2a92eb2269e8eed9ef7a065fb7a' # https://github.com/NixOS/nixpkgs/commit/f53263caceb5f2a92eb2269e8eed9ef7a065fb7a
    nixPkgs = ['...', 'bun']
    nixLibs = ['...', 'openssl']

This is my current nixpacks toml, previously I was using npm because of a fatal bun bug with turborepo, but Jarred help me with a fix (and it'll be prevented going forward in 1.0.15).

Do I still need to explcitly declare bun as a nixPkg in my nixpacks.toml? I think I can remove it, but if I remember correctly, the default is an older version of Bun.

Is there a way I can always use latest?

0 Replies

a year ago

Yes


a year ago

FROM oven/bun:1 as base
WORKDIR /usr/src/app

RUN apt update \
    && apt install -y curl

# Install nodejs using n
ARG NODE_VERSION=18
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
    && bash n $NODE_VERSION \
    && rm n \
    && npm install -g n

COPY . .
ARG DATABASE_URL
ARG DIRECT_URL
RUN dir -s    
RUN cd ./apps/ws_server && bun install --frozen-lockfile && cd /usr/src/app

ENV NODE_ENV=production
# RUN bunx prisma generate
RUN bunx turbo run build --filter=ws_server

CMD bunx turbo run start --filter=ws_server

a year ago

My file tree:

1177497013277950000


developerharrisHOBBY

a year ago

you're the best


developerharrisHOBBY

a year ago

ty


a year ago

no u for picking Railway


a year ago

Happy Belated Thanksgiving!


developerharrisHOBBY

a year ago

you as well!


a year ago

also massive thanks to @luna and @Brody- they deserve the credit as well 🤗


developerharrisHOBBY

a year ago

@angelo two last questions, the dockerfile shouldn't mess with anything else right like my nextjs app or anything?


developerharrisHOBBY

a year ago

that was my original concern and why I wanted to put it in the subfolder, not knowing it'd cause a lot of issues lol


developerharrisHOBBY

a year ago

to make it use the container start do i just leave that setting blank?


a year ago

Yep


a year ago

i dont know the answer but i am curious especially based on https://twitter.com/leeerob/status/1727380301054349441


a year ago

You are hosting this on vercel? I don't think it should interfere


developerharrisHOBBY

a year ago

<:ohlord:1101505306187546694>


a year ago

This is a revamp of Zeit Now if you remember


a year ago

back when Vercel were called Zeit


developerharrisHOBBY

a year ago

before i knew about it


developerharrisHOBBY

a year ago

i only knew it was called Zeit because a founder I know created Zeet in response


developerharrisHOBBY

a year ago

and he had to explain it to me lol


developerharrisHOBBY

a year ago

1177502160171315200


developerharrisHOBBY

a year ago

ah


a year ago

we will see that world with railway


a year ago

Johnny is cool person! (Zeet)


developerharrisHOBBY

a year ago

All aboard! chugga chugga chugga


developerharrisHOBBY

a year ago

🚄


developerharrisHOBBY

a year ago

zoom


developerharrisHOBBY

a year ago

what issue would i need to watch if i wanted to change it in the future? is it a bun thing


developerharrisHOBBY

a year ago

for example if i had another docker app in that same monorepo


a year ago

so, if you can for me, can you trigger a vercel PR deployment? I don't think it should interfere


developerharrisHOBBY

a year ago

just did


developerharrisHOBBY

a year ago

no issue


developerharrisHOBBY

a year ago

1177502944564875300


a year ago

vercel looks for a turbo.json at the root so that seems to be fine


developerharrisHOBBY

a year ago

but I guess I was asking more generally, lets say I add another backend app that uses docker


developerharrisHOBBY

a year ago

is that just not possible with how bun handles things rn?


developerharrisHOBBY

a year ago

to have it not at root


a year ago

you would just make a new Dockerfile at root and filter the same way you did with ws


a year ago

Railway can point to a specific dockerfile



developerharrisHOBBY

a year ago

gotcha so that solves the issue completely then <:poggers:1112714211026538568>


a year ago

pog


developerharrisHOBBY

a year ago

although ocd me really wants to put them in subfolders


a year ago

just give them nice names


developerharrisHOBBY

a year ago

I'll name Dockerfile.Tim and Dockerfile.George


developerharrisHOBBY

a year ago

<:salute:971459155493810256>


developerharrisHOBBY

a year ago

1177504065547145200


developerharrisHOBBY

a year ago

1177504428857761800


rkm3FREE

14 days ago

We're working towards SOC2 and are wondering how people manage permissions and log retention?
I like how easy railway ssh is, but I'm not sure if I can track (a) who uses it (b) what they do on production hosts.


14 days ago

May I ask you to open your own thread for that?


rkm3FREE

14 days ago

I'd love to, I'm not sure how.


14 days ago

New Post 🙂

1366858654237724700


rkm3FREE

14 days ago

Super thanks Brody. I made a new post. WIll delete these.


Switched back to bun as package manager, do I still need it in nixpacks.toml? - Railway Help Station