Is it possible to deploy few services from single repo with toml file?
diamond3
HOBBYOP

2 years ago

In Railway documentation i see only examples with single service creation in .toml. So was wondering if it is possible to deploy two services with separate docker files from one repository using github repo deploy? Or maybe it is possible to define few toml files in single repo?

Closed

12 Replies

diamond3
HOBBYOP

2 years ago

N/A


2 years ago

what kind of two services?


2 years ago

isolated or shared monorepo?


diamond3
HOBBYOP

2 years ago

shared monorepo


diamond3
HOBBYOP

2 years ago

basicly one asp.net api and console app for cron jobs


2 years ago

what are each Dockerfile names?


diamond3
HOBBYOP

2 years ago

I have it like this at the moment:

solution

  • main-api
    • Dockerfile
  • console-app
    • Dockerfile
  • railway.toml

diamond3
HOBBYOP

2 years ago

and in toml i provide the path to dockerfile

[build]
builder = "dockerfile"
dockerfilePath = "./AccountingApp.Application/Dockerfile"

diamond3
HOBBYOP

2 years ago

everything works fine with single project but not sure if it would be possible to add second dockerfile path so it would build two services instead of one


2 years ago

okay so you will need two railway services that deploy from the same repo, and then in each service you will set a RAILWAY_DOCKERFILE_PATH variable, no .toml config needed.


diamond3
HOBBYOP

2 years ago

thanks, it worked


diamond3
HOBBYOP

2 years ago

also found, that it was possible define toml path, that allows me to have separate config as code for each service


Welcome!

Sign in to your Railway account to join the conversation.

Loading...