Triggering a redeploy when docker image is updated in dockerhub
Currently, our deployment flow is
1. use a github workflow to build and upload 2 docker images to dockerhub
2. update image on railway
is there some way to automatically trigger a redeploy? Any of the following will help
1. some webhook to trigger a redeploy for a specific service (but not everything in the environment because I have other dbs/redis). If this is possible, I will just post the docker image to tag -latest and the image name won't change.
2. some way to use the railway cli to update a docker image for a service? then i can just call the railway cli from my CI action to trigger a rebuild
3. some setting that will auto-pull new docker images when they are created in a repo
5 Replies
Project ID:
04fad5fa-c820-4543-8090-545daa4b360d
Project id 04fad5fa-c820-4543-8090-545daa4b360d
you would have to call the api to trigger a re-deploy, look at the source code for this bookmarklet, it does exactly what you want
https://bookmarklets.up.railway.app/service-redeploy/
you would really only need the
serviceConnect
mutation since you already know the source
this bookmarklet calls the internal api endpoint, and you will need to do that too, the public api endpoint does not yet support connecting a docker image to a service
tagging @sr for visibilitythank you! will give this a try
let me know if you need any additional help!