a year ago
In the [documentation]() for Railway configuration files, I saw that you can use the .toml format
Previously I used JSON format, and now I have a little difficulty with the transfer, it is not quite clear how to write it correctly. My early config:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"providers": ["python"],
"phases": {
"setup": {"nixPkgs": ["...", "nodejs"]},
"install_npm": {"cmds": ["npm ci --include=dev"], "dependsOn": ["setup"]},
"tailwind": {
"cmds": [
"npx tailwindcss -i static/tailwind/input.css -o static/tailwind/output.css"
],
"dependsOn": ["install"]
}
}
}
}
}
Desirable:
[build]
builder = "nixpacks"
[deploy]
startCommand = "uvicorn main:app"
restartPolicyType = "never"
0 Replies
a year ago
N/A
a year ago
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"providers": ["python"],
"phases": {
"setup": {
"nixPkgs": ["...", "nodejs"]
},
"install_npm": {
"cmds": ["npm ci --include=dev"],
"dependsOn": ["setup"]
},
"tailwind": {
"cmds": ["npx tailwindcss -i static/tailwind/input.css -o static/tailwind/output.css"],
"dependsOn": ["install"]
}
}
}
},
"deploy": {
"startCommand": "uvicorn main:app",
"restartPolicyType": "NEVER"
}
}
a year ago
unless you wanted to remove the node stuff?
a year ago
I must have misspoken, I need to migrate the old json config to toml format
a year ago
why? json is definitely better for this
a year ago
It seemed like a better option to me
a year ago
you dont get auto complete in vscode with the toml file
a year ago
But if you say that json option is optimal, then I will trust your decision
a year ago
thank you