build fails on redeploy from ui
So I use a dockerfile to deploy my service using cli, the entire image only consist of a single js file and it seems like railway grabs the entire directory anyway and then tries to build the the thing from the wrong files and fails.
Is it time to use .railwayignore?
Solution:Jump to solution
tl;dr dont let railway's ui redeploy your service, cancel it and use the bookmarklet
33 Replies
Project ID:
1f0944a2-14bd-447c-bb7f-2d7bedb23ed1
1f0944a2-14bd-447c-bb7f-2d7bedb23ed1
dockerfile for the reference:
yes railway would gzip the entire directory as long as the file / folder is not in either a .gitignore or a .railwayignore
I'll try that
oh great now it doesn't see the files I just make it use the same commands as in dockerfile?
not really how that works
foolery intensifies
well I guess I can fix it in cicd
run.js
is going to be the only file copied into the image, what does it matter if the rest of the directory is uploaded?because railway tries to run index.ts that is also copied and that big boi won't run without being bundled first
this is all happening on redeploy
then railway may be running old code, and thats another issue
or you have a start command set in the service settings
nope I don't
then its the first option
use this to do your redeploys https://bookmarklets.up.railway.app/service-redeploy/
railway does it automatically each time an env variable is changed
actually the problematic part is "build" step
where does it even take it from 😁
it just uses the default step for deno which is not required here
i know, its a bug that im going to be pressing the team to fix
it caused a lot of issues when people went to redeploy their services after they went down yesterday
so it shouldn't redeploy when that happens?
Im confused
(just a bit)
railways auto redeploy on variable change can deploy old code
oh
got it
but there's no "old" code per say
there is somewhere
old deployment, same same
you mean like parts of the deploy it takes as the base or one before it?
because here it never had that index.ts as the input
railways auto redeploy on variable change can deploy your very first deployment
okay, got it but I don't think it's related
the actual build is handled by gitlab
railway just gets the js file
😐
this thread is titled "build fails on redeploy from ui"
so yes it is related
it's 11 pm I may be dumb rn
yeah but it fails due to railway trying to execute that "build" step, not the old code
Solution
tl;dr dont let railway's ui redeploy your service, cancel it and use the bookmarklet
okay
fair
trust, auto redeploy is bugged in likely more ways then im describing here
well I'll do more stuff with ci to make it more smooth anyway
to give it absolutely zero chances
I'm too lazy to cancel =)
gotta cancel or theres only going to be more head aches
nearly everyone who didnt use the bookmarklet and wasn’t deploying an image had issues yesterday