Railway build cache
alxc
PROOP

2 years ago

How is railway handling build caching? I have multiple subsequent builders for a branch that start from scratch, even though the dependencies in a project are identical.

5 Replies

2 years ago

Hi, can you elaborate on your question please? What are you trying to accomplish, and what errors (if any) are you running into?


alxc
PROOP

2 years ago

There are no errors. However the build times are very slow. Does railway utilize best practices in docker container layer caching? We have deployments with 100% same npm dependencies and only changes to the code that take 15 to deploy. It's egregiously slow.


2 years ago

15 what?

Have you tried their new builder? in my experience it's significantly faster -

https://railway.app/changelog/2024-05-24-builder-v2-beta#builder-v2-arrives-in-beta

Word of warning, while this may speed up the build times, this does not include the fix for the slow publish times, for that you should use a final image.


alxc
PROOP

2 years ago

Thanks for the fast response! Can you clarify what a "final image" is in railway terminology?


2 years ago

It's not Railway terminology, you would want to use a multistage Dockerfile where the resulting final image only contains the contents needed to run your app, smaller image means faster publishing times.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...