3 months ago
Hi, since docker-compose is not supported on Railway, what's the best infrastructure as code approach available on Railway?
I know about the railway.json file, but as far as I understand it's more a config as code for each service. My project is a monorepo, with multiple services, and as of today it requires several clicks through the Railway dashboard to spin up an environment.
The current bottleneck for me is not having a way to replicate easily the same environment both locally (my machine) and remotely (on Railway), like I would do with docker-compose.
11 Replies
3 months ago
Hey, Railway has no IaC support as of yet, depending on your use case you could create a template of your project or duplicate your environment through the dashboard.
There's a terraform provider maintained by the community but I've heard that it's not in a good state.
3 months ago
There's a feedback thread where people is asking for it but I kinda agree with Railway at some points, Railway main benefit is their dashboard
https://discord.com/channels/713503345364697088/1468011203648426166
Hi, just read the thread. I like Railway's canva and how easily it is to build an infra "visually".
But I don't understand how it's incompatible with docker-compose?
Having a predictible way to reproduce the same services across different environments is important, I guess
3 months ago
Railway has basic support for docker-compose though, you can click and drop your config onto Railway and it'll try its best to map it to Railway services
3 months ago
And any reason on why you can't use the duplicate environment feature from Railway?
Oh, okay, I've read several posts on station.railway.com asking for docker-compose support, and I haven't seen any updates informing us that this support has been added, my bad.
3 months ago
Yep, it's been awhile since it's supported but again, its a really basic support and not all docker-compose features all supported
For the moment, my project only includes:
a Tanstack Start app
an Elysia.js API
a basic Redis
Postgres as a custom Dockerfile, forked from Railway's
postgres-ssl, that adds some extensions
In your opinion: what's the best option available to me, both locally and on Railway, to describe and manage services using code, not a dashboard?
3 months ago
railway dev
