#Multiple Services in `railway.toml` ?

13 messages · Page 1 of 1 (latest)

unique stump
#

Is it possible to specify multiple services in a railway.toml file?

For example if I want to setup a backend service and a frontend service, can I do that from one file or is it 100% scoped to just one service?

# backend service
[build]
builder = "nixpacks"
buildCommand = "go build -o output"

[deploy]
startCommand = "./output"
restartPolicyType = "never"

--

# frontend service
[build]
builder = "nixpacks"
buildCommand = "npm run build"

[deploy]
startCommand = "node ./build/index.js"
restartPolicyType = "never"
iron oarBOT
#

Project ID: N/A

unique stump
#

Looking at the JSON Schema though it leads me to believe it's not possible

potent idol
#

yeah scoped to a single service, what's your usecase?

unique stump
#

A Go backend + Svelte frontend mono repo, I can set it up manually still - I was just wondering if I can pre-setup the repo so once I link it to a Railway project it just kinda figures itself out 🙂

#

At least this way I can automate whichever one is more time consuming to set up, and manually add the other

#

but it'd be a neat feature if defining multiple services was allowed

potent idol
#

maybe you want a template?

unique stump
#

Oh! ya I should totally look into that

#

templates can be private, right?

#

for secret stuff 🙂

potent idol
#

templates can be unpublished, but they are never private, if you have secrets you want to deploy just leave them blank and fill them out when you go to deploy the template

unique stump
#

I'll give templates a try today to see if works for me, thanks!