Railway caches Next.js apps
asamirr
HOBBYOP

13 days ago

Even though I set the following in my service:
NEXT_PRIVATE_DISABLE_CACHE="true"

NO_CACHE="1"

RAILPACK_DISABLE_CACHES="*"

I have also tried to delete the .next/cache dir in build stage, I still have the service serving different changes from my local one.

Build stage logs showed all steps are cached.

steam_locomotive emoji Caching Disabled - build performance will be impacted

load build definition from ./railpack-plan.json

0ms

copy / /app cached

0ms

install mise packages: node cached

0ms

npm ci cached

0ms

copy package-lock.json cached

0ms

mkdir -p /app/node_modules/.cache cached

0ms

copy package.json cached

0ms

npm run build

15s

ƒ (Dynamic) server-rendered on demand

copy /root/.cache cached

0ms

install apt packages: libatomic1 cached

0ms

copy /mise/shims, /usr/local/bin/mise, /etc/mise/config.toml, /mise/installs, /root/.local/state/mise cached

0ms

copy /app

944ms

copy /app/node_modules cached

0ms

exporting to docker image format

2s

containerimage.digest: sha256:6b567a0dc162d940e381228ea723e82999e31386313a1fa5821e2420a31c829c

containerimage.descriptor: eyJtZWRpYVR5cGUiOiJhcHBsaWNhdGlvbi92bmQub2NpLmltYWdlLm1hbmlmZXN0LnYxK2pzb24iLCJkaWdlc3QiOiJzaGEyNTY6NmI1NjdhMGRjMTYyZDk0MGUzODEyMjhlYTcyM2U4Mjk5OWUzMTM4NjMxM2ExZmE1ODIxZTI0MjBhMzFjODI5YyIsInNpemUiOjIzODgsImFubm90YXRpb25zIjp7Im9yZy5vcGVuY29udGFpbmVycy5pbWFnZS5jcmVhdGVkIjoiMjAyNi0wMi0yNFQwMDowNzoxNVoifSwicGxhdGZvcm0iOnsiYXJjaGl0ZWN0dXJlIjoiYW1kNjQiLCJvcyI6ImxpbnV4In19

containerimage.config.digest: sha256:1fe1f201f6dbe9c0e4fc033ae6aa4b05bd054b842b46d9e08237a99ad3216a43

image push256 MB

$10 Bounty

4 Replies

xmrafonso
FREETop 5% Contributor

13 days ago

Hey, have you tried to force a clean build? It seems to be a docker layer caching. You can actually force a cache miss in docker by adding ARG CACHE_BUST=1 at the top of your docker file. Maybe that works?


xmrafonso

Hey, have you tried to force a clean build? It seems to be a docker layer caching. You can actually force a cache miss in docker by adding ARG CACHE_BUST=1 at the top of your docker file. Maybe that works?

asamirr
HOBBYOP

13 days ago

Using Railpack


asamirr

Using Railpack

xmrafonso
FREETop 5% Contributor

13 days ago

Oh, I somehow missed that. Have you tried pushing a small change? That'd generate a diff. commit hash


xmrafonso

Oh, I somehow missed that. Have you tried pushing a small change? That'd generate a diff. commit hash

asamirr
HOBBYOP

13 days ago

Of course but unfortunately still nothing!


Loading...