Disable Cache for build step on Railway
How do I disable cache for the build on railway. I've tried adding NIXPACKS_NO_CACHE=true or NIXPACKS_NO_CACHE=1 to the environment variables, but nothing changes.
I really need to do this to debug an issue. Would be great to be able to do this without deleting and redeploying the instance
3 Replies
docker layers will always be cached, this isn't something that can be turned off, but your problem is likely elsewhere.
so what is the specific issue you are trying to debug?
Hi @Brody ... I'm really pulling my hair out on this one!
I'm deploying a Medusa backend and have extended the product service. Everything works on my local machine, however I get the following error on my production instance on Railway...
in trying to debug this issue, I have tried my best to reproduce the Railway deploy environment on my local machine:
+ Build with Nixpacks locally and run with Docker (works as expected locally)
+ Build with Docker using Dockerfile (modified Nixpacks output).... and build on Railway with same Dockerfile
+ still works as expected locally but throws above error on Railway
I'm running out of ideas why this is happening. Dockerfile below for interest...
'''
I've also pushed my working docker-image to ghcr.io and tried to deploy using this source-image... but can't seem to get the configuration right to work on Railway. Deployment fails and there are no logs to trouble-shoot why
have you tried writing your own dockerfile, one that doesnt have anything to do with nixpacks or nix