#Triggering a redeploy when docker image is updated in dockerhub

8 messages · Page 1 of 1 (latest)

vernal mountain
#

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
shut dawnBOT
#

Project ID: 04fad5fa-c820-4543-8090-545daa4b360d

onyx hedgeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

vernal mountain
#

Project id 04fad5fa-c820-4543-8090-545daa4b360d

narrow arrow
#

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

narrow arrow
#

tagging @vernal mountain for visibility

vernal mountain
#

thank you! will give this a try