I deployed a service via docker image (https://docs.railway.app/develop/services#service-source). Now when I call railway up in my github actions (with the RAILWAY_TOKEN set to that service's token), it does not deploy the docker images but instead tries to build my project using nixpacks. How can I instruct Railway to download the latest docker image and deploy it?
#How to re-deploy a docker image source?
35 messages · Page 1 of 1 (latest)
Project ID: 16582eee-f963-4f76-a699-aa37b8edbec1
16582eee-f963-4f76-a699-aa37b8edbec1
railway up is used to deploy your local project and has nothing to do with docker images
what docker image did you use
Its from my project
how would railway know when I release a new image?
and will it deploy it then?
they dont, you have to go and click redeploy in the 3 dot menu
thats a shame. does the public API have anything that can help me automate this?
i think it does
yes it does, you would want to setup a github action to call their public graphql api
how about caching? Will the image be cached on the Railway builders and when I redeploy, the existing image will be used instead of pulling the latest image. Anything I can do to prevent that?
if you redeploy the same image, yes the layers do get cached, if you deploy an entirely new image, no cache
well ghcr.io/ignisda/ryot:latest is technically the same image, right? Atleast thats what is docker's default behavior.
is there a env variable that instructs railway to not use docker caching mechanism?
there is not
as v2.18.7, yes
for now since that is the latest tag
of what?
your image
my latest image is tagged both v2.18.7 and latest.
correct
now lets say I release v2.18.8 (and a latest to go along with it). How would railway know to not re-use the existing cache?
there used to be one back when I used railway almost 1.5 years ago. I think it was DOCKER_CACHE=0.
interesting
thats not how docker works. if you already have a ghcr.io/ignisda/ryot:latest on your machine, it does not check for SHA, just assumes it is the latest (even though it is not and there exists a newer image on the registry).
bruh
I also think it was added specifically for me since I was in a similar situation back then.