railway.toml documentation
Hi, is it possible to configure everything related to service in the railway.toml?
what I would like - adding a volume, define a custom public url, region (when available), app sleep... I can't find it in the documentation.
And I guess there is no way to create/export a railway.toml from a configuration in the UI?
9 Replies
Project ID:
N/A
N/A
is it possible to configure everything related to service in the railway.toml?not everything, no
adding a volumeno
define a custom public urlno
region (when available)no, but regions are already available https://docs.railway.app/deploy/deployments#regions
app sleep... I can't find it in the documentation.yes
And I guess there is no way to create/export a railway.toml from a configuration in the UI?export the file in the details tab of a service's deployment ref: https://docs.railway.app/deploy/config-as-code https://backboard.railway.app/railway.schema.json though with your question I'm quite curious, what is your usecase, if you don't mind sharing?
thank you @Brody ! I didn't notice the configuration json/yaml 🙂
Basically I have very similar services, from the configuration pov they are same. So when I create a new project repo, I would just copy/paste railway.toml and once it is a deployed to railway I don't need to go and manually clicking it, creating volume and other options.
also from a portability of the project it would make sense to have sort of IaC
you could create a template out of your project and then deploy your template, give this a read https://docs.railway.app/reference/templates
though, you can't specify a region or a custom url when making a template
this is not my use case, because I don't want to create a new project, just a service(s) inside existing one.
gotcha, then your next option is to write code that interacts with Railways public api to orchestrate your service creation that way
https://docs.railway.app/reference/public-api
I will have a look. thanks!
if you need help with the api im here