R
Railwayβ€’3w ago
Hexworker

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

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
version: "3.7"

services:

postgres:
image: postgres
tempo:
image: grafana/tempo:latest
prometheus:
image: prom/prometheus:latest
grafana:
image: grafana/grafana:10.1.1
Solution:
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. - postgres: https://railway.app/template/postgres...
Jump to solution
12 Replies
Percy
Percyβ€’3w ago
Project ID: c96ea2ca-1b03-415f-8931-5af0e51c87c4
Hexworker
Hexworkerβ€’3w ago
c96ea2ca-1b03-415f-8931-5af0e51c87c4
Solution
jeremy
jeremyβ€’3w 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. - postgres: https://railway.app/template/postgres - grafana: https://railway.app/template/anURAt - prometheus: https://railway.app/template/KmJatA 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
Hexworker
Hexworkerβ€’3w ago
i think i'll just leave things as-is until i can use some sort of IaC descriptor i don't really care if it is docker-compose or something else do you have plans to support this config as code use case (describe the whole project, not just services individually)
Brody
Brodyβ€’3w ago
(Jeremy doesn't work for railway)
Hexworker
Hexworkerβ€’3w ago
do you?
Brody
Brodyβ€’3w ago
yes and what Jeremy said is entirely correct
Hexworker
Hexworkerβ€’3w 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
railway deploy-project local
or remotely onto Railway like
railway deploy-project remote
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
Brody
Brodyβ€’3w 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
Hexworker
Hexworkerβ€’3w ago
i don't really want to use terraform NGL thanks anyway
Brody
Brodyβ€’3w ago
the project canvas it is!
Hexworker
Hexworkerβ€’3w ago
πŸ‘
Want results from more Discord servers?
Add your server