a month ago
Hey Team,
We have a project with 4 services, and we're wanting to figure out how to migrate all settings related to the project and the ui to config as code so that we can automate changnes with claude instead of click ops.
I've used the cli to link a project locally, and git status reports as such, but I don't see a .railway or railway.toml
45 Replies
a month ago
(no markdown available for this content)
a month ago
IIRC there isn't a way to directly migrate all settings from the dashboard UI into toml/json.
a month ago
The settings in the dashboard will not be updated with the settings defined in code. Configuration defined in code will always override values from the dashboard.
right so if I wanted to migrate to config as code, I'd have to:
- manually migrate the settings
- override the settings in the ui to match (because they won't be updated)
- tell devs not to touch the ui (because there's no way to lock it)
a month ago
Basically, yes.
a month ago
The UI will lock on certain settings once you have config files setup iirc
a month ago
"Overriding" settings in the UI isn't necessary, but if you want them to match your json/toml configuration, then sure.
a month ago
that sounds contradicting
a month ago
That's what the docs say 🤷
a month ago
cac takes priority
it also displays the cac value in the ui, and locks the ability to change it
a month ago
Yes this is true. Been my experience
a month ago
- if you open up a deployment on the dash, it shows the cac equivalent you can copy over
- see above
- yes to the "don't try to update in ui"
so point 3 is invalid because they'll be locked
point 2 is invalid for the above, but the docs are outdated
point 1 is still valid
a month ago
sleepy read it wrong, edited
a month ago
It'll be something like this.
Attachments
Thank you I've found the config as code in the ui
Something that's not really clear is, how they should be setup for multiple services in the same repo?
e.g. they all say to save as railway.toml
do I just rename them based on the service?
a month ago
If it's in a monorepo, you can put the config file in each "service's" root directory.
a month ago
Eg, if I have /frontend and /backend from the same repository hosted on Railway, I'd save each services' config files in /frontend/railway.json and /backend/railway.json.
a month ago
Don't think that would be possible, if they're hosted from the same directory.
this is what was meant earlier by the config that I could copy out?
Attachments
a month ago
Yes.
a month ago
Each service has its own configuration.
Attachments
a month ago
^
sorry what's not possible?
I have multiple workers defined from the same directory so that doesn't seem like the issue
a month ago
IIRC Railway does not support having multiple config files in a single directory if multiple services are hosted in that directory.
a month ago
These "config files" are generated from the service itself. It ignores other services.
a month ago
No.
a month ago
I believe that it is possible to make multiple files and do it like "content.railway.toml", might not be detected properly but nothing should stop you from setting the path manually
a month ago
How would you set the path?
a month ago
in service settings of course
Attachments
a month ago
free form input with autocomplete
a month ago
Nevermind I'm blind 💀
a month ago
hi blind im astrid
a month ago
@evan turns out you can do something like worker1.railway.toml and worker2.railway.toml as long as you specify the path to the config file as shown in Astrid’s image.
-# Sorry 😭
a month ago
-# Sorry 😭