#Watch paths in Config as Code

8 messages · Page 1 of 1 (latest)

random crescent
#

I have a monorepo project with:

.
└── apps
    ├── backend
    └── frontend

The railway.json is located in apps/backend/railway.json. And in the platform I can see the message:

This comes from $.build.watchPatterns in apps/backend/railway.json

So I think the file is being read correctly.

The file config content is:

{
    "build": {
        "builder": "nixpacks",
        "buildCommand": "npm run build",
        "watchPatterns": ["src/**"]
    },
    "deploy": {
        "startCommand": "npm run start",
        "healthcheckPath": "/status",
        "healthcheckTimeout": 100,
        "restartPolicyType": "on_failure"
    }
}

But when I push a commit with only changes on /apps/frontend/ the build trigger. How can I configure watchPatterns to trigger only on /apps/backend changes?

signal ravine
#

this?

random crescent
signal ravine
#

then idk

random crescent
#

Thanks anyway

#

It would be nice to know what is the base path that watchPatterns use, is it the base path of the repository, the folder where the config file is located, the project path defined in the platform?

hollow lily
#

This must have gotten buried!

Tagging in @thorn wraith to see this.