Is there a way to translate my docker-compose file to a railway config file?
addamsson
PROOP

2 years ago

I'm new to railway and I was trying to create a railway.json file do describe my deployment but it seems that this can only be used to describe my app (not including its services). Is there a way to transform my existing docker-compose file into a descriptor that I can use instead of having to fiddle around on the Railway UI? This is what I have for reference (I omitted the details):

version: "3.7"

services:

    postgres:
        image: postgres
    tempo:
        image: grafana/tempo:latest
    prometheus:
        image: prom/prometheus:latest
    grafana:
        image: grafana/grafana:10.1.1

14 Replies

addamsson
PROOP

2 years ago

c96ea2ca-1b03-415f-8931-5af0e51c87c4


2 years ago

You would need to create separate services for each of them, docker-compose isn't supported yet

You might want to take a look at the marketplace to find pre-existing templates for the service you want to use.

I couldn't find one for tempo

Alternatively, you could write your own dockerfiles, eg. dockerfile.grafana, dockerfile.tempo, and so on, and point them to Railway


addamsson
PROOP

2 years ago

i think i'll just leave things as-is until i can use some sort of IaC descriptor


addamsson
PROOP

2 years ago

i don't really care if it is docker-compose or something else


addamsson
PROOP

2 years ago

do you have plans to support this config as code use case (describe the whole project, not just services individually)


2 years ago

(Jeremy doesn't work for railway)


addamsson
PROOP

2 years ago

do you?


2 years ago

yes and what Jeremy said is entirely correct


addamsson
PROOP

2 years ago

so I can set up my project by clicking through, but what would be really awesome is if I had a d escriptor (like this docker compose file) that I can use locally like

railway deploy-project local

or remotely onto Railway like

railway deploy-project remote

and it would use the same file so I can have consistent environments both locally and remotely and whenever I change this file it would apply the changes to my project


2 years ago

there's a community developed terraform provider, but if I recall correctly it has it's shortcomings, otherwise you need to create the services manually as per Jeremy's message


addamsson
PROOP

2 years ago

i don't really want to use terraform NGL


addamsson
PROOP

2 years ago

thanks anyway


2 years ago

the project canvas it is!


addamsson
PROOP

2 years ago

👍


Loading...