2 months ago
I have a folder of backend inside the root i want to build and deploy.
I get those errors:
The config file format is not yet finalized and subject to change.
Script start.sh not found
I was try setting a config file
{
"steps": {
"build": {
"inputs": [
{
"local": true,
"include": ["backend"]
}
],
"commands": [
"pip install -r backend/requirements.txt",
"python backend/build.py"
]
}
}
}
2 Replies
2 months ago
set root directory first:
go to your service settings in railway and set root directory to
backendyour railway.json format is wrong. delete that whole config and create
backend/railway.jsonwith:
json
{
"$schema": "https://railway.com/railway.schema.json",
"build": {
"builder": "RAILPACK"
},
"deploy": {
"startCommand": "python main.py"
}
}change python main.py to whatever actually runs your backend (like uvicorn main:app --host 0.0.0.0 --port $PORT if you're using fastapi)
the main issue is railway doesn't use that "steps" and "inputs" structure you have. also setting root directory tells railway to only look at your backend folder so it stops looking for start.sh in the wrong place