can i set my python version for my deployment

Anonymous
TRIAL

a year ago

Hello folks,

I want to deploy a fastapi project in railway with python 3.12 any hints of help? my current railway.json is the next one: {
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"startCommand": "uvicorn main:app --host 8000"
}
}

0 Replies

Anonymous
TRIAL

a year ago

N/A


a year ago

nixpacks only supports python 3.11, you can specify that by adding a runtime.txt file with just 3.11 in it.

additionally, you would want to use this start command instead - uvicorn main:app --host 0.0.0.0 --port $PORT


can i set my python version for my deployment - Railway Help Station