#Deploy finished Docker Image instead of re-building it

12 messages · Page 1 of 1 (latest)

brittle swan
#

I am using Railway to host a Showcase for a Add-on project I made. So far I always used the railway up command in the CI on GitHub and it somehow worked to get the app running. However I already build and deploy a Docker image to GitHub and find it a little bit useless to re-build the whole container for this purpose. Also I need to build the Maven project before the actual Docker build so that the required artifact is available and for some reason this does not work any longer.

So - is there a possibility to deploy a finalized Docker Image using Railway?

Project ID : 623ba24d-b5d8-438f-8db4-9e0da9e99b24

crisp briarBOT
#

Project ID: 623ba24d-b5d8-438f-8db4-9e0da9e99b24

eternal chasm
#

current work around would be using a dockerfile and just have it run the prebuilt image

brittle swan
#

Hmm, not sure if I completely understand this ... You mean creating a separate Dockerfile for Railway that pulls the compiled Docker image from my Github, extracts the content and starts it manually? 🤔

eternal chasm
#

like this type of thing

brittle swan
#

Oh well that's quite easy, thanks for the hint 🙂

eternal chasm
#

no problem!

brittle swan
#

One more quick question 🙈 Is it somehow possible to modify a env var via the railway CLI?

Background: The whole railway deployment runs in GitHub workflows and I would like to make the image tag configurable ideally so that I do not have to stick to "latest", even though this is most probably the most common use case.

I found this documentation which suggests that railway variables add worked back then but now seems deprecated.

Railway Docs

Documentation for Railway

eternal chasm
#

railway variables just prints the environment variables, to modify variables you'd have to use the api

eternal chasm
#

the variableUpsert mutation to be exact

brittle swan
#

Thanks! I was able to use the api to publish these vars into my Railway instance and also to configure them to be shared with my service. I just have the problem that for some reason the build tells me it cannot find my custom Dockerfile even though it is present at /showcase/Dockerfile-Railway. It just worked when I re-connected the repo to the service 🤷‍♂️