Using dynamically specified docker image tags
rivertam
PROOP

5 months ago

I'd like to deploy PR environments, but we're not using Railpack, so we just build our docker images separately and push to GHCR.

I'd like to make it so the service images can be specified as something like ghcr.io/org/repo:${{RAILWAY_ENVIRONMENT_NAME}} but that doesn't seem to be supported (even trying to save it just silently fails).

Is anything like this supported?

$10 Bounty

2 Replies

IIRC no, that’s not directly supported. You can, however, implement a workflow into your CI/CD pipeline where it calls the Railway public API and creates environments and deploys images with specific tags into it.

https://railway.com/graphiql


vietanhtran16
PRO

3 months ago

I am trying to achieve the same set up too but running into issues.

Here are the steps we doing at the moment:

  • Build docker images with specific tags for the PR eg: backend:pr-$prNumber-$gitHash
  • Push those images to GHCR
  • Call railway graphql to update the services to the docker images that we just published

When I view the environment in railway dashboard though, it always shows this error. Do you know if there is a way around this issue? What am I missing?

Attachments


Welcome!

Sign in to your Railway account to join the conversation.

Loading...