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

2 years 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?

54 Replies


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

My file tree:

1177497013277950000


developerharris
HOBBYOP

2 years ago

you're the best


developerharris
HOBBYOP

2 years ago

ty


no u for picking Railway


Happy Belated Thanksgiving!


developerharris
HOBBYOP

2 years ago

you as well!


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


developerharris
HOBBYOP

2 years ago

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


developerharris
HOBBYOP

2 years 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


developerharris
HOBBYOP

2 years ago

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



2 years ago

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


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


developerharris
HOBBYOP

2 years ago

<:ohlord:1101505306187546694>


This is a revamp of Zeit Now if you remember


back when Vercel were called Zeit


developerharris
HOBBYOP

2 years ago

before i knew about it


developerharris
HOBBYOP

2 years ago

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


developerharris
HOBBYOP

2 years ago

and he had to explain it to me lol


developerharris
HOBBYOP

2 years ago

1177502160171315200


developerharris
HOBBYOP

2 years ago

ah


2 years ago

we will see that world with railway


Johnny is cool person! (Zeet)


developerharris
HOBBYOP

2 years ago

All aboard! chugga chugga chugga


developerharris
HOBBYOP

2 years ago

🚄


developerharris
HOBBYOP

2 years ago

zoom


developerharris
HOBBYOP

2 years ago

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


developerharris
HOBBYOP

2 years ago

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


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


developerharris
HOBBYOP

2 years ago

just did


developerharris
HOBBYOP

2 years ago

no issue


developerharris
HOBBYOP

2 years ago

1177502944564875300


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


developerharris
HOBBYOP

2 years ago

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


developerharris
HOBBYOP

2 years ago

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


developerharris
HOBBYOP

2 years ago

to have it not at root


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


Railway can point to a specific dockerfile



developerharris
HOBBYOP

2 years ago

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



developerharris
HOBBYOP

2 years ago

although ocd me really wants to put them in subfolders


2 years ago

just give them nice names


developerharris
HOBBYOP

2 years ago

I'll name Dockerfile.Tim and Dockerfile.George


developerharris
HOBBYOP

2 years ago

<:salute:971459155493810256>


developerharris
HOBBYOP

2 years ago

1177504065547145200


developerharris
HOBBYOP

2 years ago

1177504428857761800


rkm3
FREE

a year 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.


a year ago

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


rkm3
FREE

a year ago

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


a year ago

New Post 🙂

1366858654237724700


rkm3
FREE

a year ago

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


Loading...