66 Replies
Project ID:
N/A
โ ๏ธ experimental feature
My old build was 400MB it's now 100MB.
cheers
so if it is okay can u go to ur last deployment using nixpacks
and send the table at the toop of the build logs?
That?
yup cheers
do you need openssl?
I was forcing v18 since I needed fetch.
you dont install it in ur dockerfile
dont think so. Im using alpine and i didnt add ssl myself.
maybe alpine does some funny stuff
nah you need to usually add it yourself.
all the images at work have alpine + openssl installed so i know it's for sure missing by default
can u send ur like prisma file
prisma schema
here, one better https://github.com/ImLunaHey/jive/
ahhh thank you
gonna work on making this better hopefulkly
the only unconventional thing im doing is using tsup to bundle all the deps inline, but that's no different to using esbuild, webpack, etc.
plus the savings just from using 2 images is huge, the second(final) only gets the production deps.
problem is with nixpacks, we have to copy over all deps as we dont know which is which
like, if a prod app needs a dev dep to start or something
yeah, we also use this at work to easily remove things from node_modules like markdown files and such people forget to remove from the deps before publishing.
https://www.npmjs.com/package/node-prune
We saw 50% reduction in some of our node_modules from that alone.
if a prod app needs a dep to start it's a dep not a devDep, idk why people confuse those.
well people are idiots lol
my main point is it's not really an issue if people use them how they're meant to be used.
you kinda unfortunately have to expect it
true ๐ฆ
GitHub
Alpine Images ยท railwayapp/nixpacks ยท Discussion #825
Alpine Linux is a distribution of Linux that is secure and small. I think we should use it over Ubuntu/Debian whenever possible, which is basically when a plan doesn't require any apt packa...
alpine has openssl v3 by default now, but yeah could install v1 compat
what do u think about the issue i sent
the more ya know.
would likely cause a TON of issues but could shrink image size a bit
how so?
๐ค
switching package managers from apt to apk, different system dependencies, stuff like that
i said if the plan didnt have any apt packjages
would likely cause some hidden issues in people's projects, stuff like "libmonkey.so.c not found"
we could use alpine images
ah
monkey!?!
:lipbite
wait
it's not what it looks like
well yeah if it's a bone stock js project then alpine 18 is probably the move
what about using debian slim?
that's what i use on several projects
could get neb's opinion
Neber
debian slim would be at least a move in the right direction. Plus add multi-step builds and that'd shave a lot of space.
we already do multi stage
I mean.. you do but you dont take advantage of it though.
Looking at my logs it creates with the build step, then does everything in stage-0. Kinda defeating the whole purpose of multi-step.
wait what
that sounds broken
That's build step.
something got brokeyn
and then after that stage-0
nothing after stage-0
I too have noticed this, I thought I was just tripping though
well thats definetly broken
i blame Brody (he uses go)
so maybe you dont need to change anything but just fix this lol
Fair
lo
I think railway likes shipping 400mb images
lmof
hi
yeah nixpacks are massive
NEB
im gonna be diving in sometime this week
nebnebnebn
neb something bad is happening
what
<#1083064733122441286>
Keep in mind that with the layer cache on the registry, the things that we need to upload and pull are often much lower than this
Often source changes to node projects result in about 30mb changes
Only for specific languages
Oh yeah I know, I'm just joking around
We used to use debian slim but moved to Ubuntu since Debian was being annoying with a few packages. Mainly openssl (still used 1). This image size is very comparable though
Oh