R
Railway•12mo ago
peterk

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
Percy
Percy•12mo ago
Project ID: N/A
peterk
peterk•12mo ago
N/A
Brody
Brody•12mo ago
is it possible to configure everything related to service in the railway.toml?
not everything, no
adding a volume
no
define a custom public url
no
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?
peterk
peterk•12mo ago
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
Brody
Brody•12mo ago
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
peterk
peterk•12mo ago
this is not my use case, because I don't want to create a new project, just a service(s) inside existing one.
Brody
Brody•12mo ago
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
peterk
peterk•12mo ago
I will have a look. thanks!
Brody
Brody•12mo ago
if you need help with the api im here
Want results from more Discord servers?
Add your server