Per-service Config as Code

Is it possible to ship a railway.json for each service in my monorepo, or, a way to segment my railway.json such that I can define settings for different services? A more concrete use-case may be that I have 3 apps within a turborepo. I want to define the custom dockerfile path for each application and have railway standup a service for each dockerfile. I suspect this isn't possible based on the config schema but wondering if there are any workarounds in the meantime? Project ID: ef7fcff6-4369-4ace-9d06-f74fd0f47a4e
8 Replies
Percy
Percy2y ago
Project ID: ef7fcff6-4369-4ace-9d06-f74fd0f47a4e
Percy
Percy2y ago
Config as Code allows this configuration to live alongside the code it configures which means it will be tracked in version control. It also makes it easy to enable different settings on a per-environment basis and helps guarantee determinism for your Railway collaborators.
⚠️ experimental feature
Brody
Brody2y ago
Brody
Brody2y ago
it seems its a beta only feature i think that badge means priority boarding members only have access to it, so do /beta
cephalization
cephalizationOP2y ago
Ahh, that makes sense. So it looks like my workflow may be supported in railway provided that I make all services manually using the same monorepo
Brody
Brody2y ago
correct, 3 monorepo services = 3 services in a railway project all with their applicable root and config paths
jr
jr2y ago
For a turborepo monorepo, you likey don't want to set the root directory since nothing outside of that directory is accessible during the build. However, you can set the config file path relative to the root to each services railway.json file to codify different settings for each service
cephalization
cephalizationOP2y ago
Nice, that sounds good to me. I will look into priority boarding then!
Want results from more Discord servers?
Add your server