R
Railway•14mo ago
eirk

Config as Code fields null

How do i set a field like restartPolicyMaxRetries to null?
32 Replies
Percy
Percy•14mo ago
Project ID: N/A
eirk
eirkOP•14mo ago
No description
eirk
eirkOP•14mo ago
using "null" as the value errors, as well as just plain null
eirk
eirkOP•14mo ago
No description
eirk
eirkOP•14mo ago
No description
eirk
eirkOP•14mo ago
Im curious what the original intention was supposed to be also whats the default value?
Brody
Brody•14mo ago
10, disabling retrying is a different field
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"deploy": {
"restartPolicyType": "NEVER"
}
}
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"deploy": {
"restartPolicyType": "NEVER"
}
}
once restartPolicyType is set to NEVER you just omit the restartPolicyMaxRetries field
eirk
eirkOP•14mo ago
wheres that documented, or is it not? how would u make it lways restart on crash?
Brody
Brody•14mo ago
every service you have ever created would have shown the default as 10 🤣 set restartPolicyType to ALWAYS pro tip, use a railway.json file with the schema shown above and edit it on an ide that supports validating the document against that schema (vscode)
eirk
eirkOP•14mo ago
but toml looks nicer 😢
Brody
Brody•14mo ago
i mean 99% of your questions could have been answered with the autocomplete vscode gives you on a json document with a schema
eirk
eirkOP•14mo ago
what 99% of my questions default value wasnt answered null wasnt answered
Brody
Brody•14mo ago
10 null is a json thing lol the json schema for railway.json allows for null
eirk
eirkOP•14mo ago
how come the examples deal with toml then also ^
Brody
Brody•14mo ago
already answered the author liked toml, just like you 🤣
eirk
eirkOP•14mo ago
i tought: ON_FAILURE - restart when the service exits with a non-zero exit code, up to restartPolicyMaxRetries times ALWAYS - restart when the service exits with any exit code, up to restartPolicyMaxRetries times NEVER - dont restart but r u saying that ALWAYS - restart when the service exits with a non-zero exit code, always ?
Brody
Brody•14mo ago
given the fact that the input box disappears when you select always, leads me to believe that its the last option you gave but now that im thinking about it, infinitely restating a service on crash would be kinda pointless
eirk
eirkOP•14mo ago
i just want concise and precise docs 😭
Brody
Brody•14mo ago
can i ask you a question and not have it sounds rude?
eirk
eirkOP•14mo ago
yes?
Brody
Brody•14mo ago
genuine question, genuinely curious. you have been in this server for a long time, and have also been using railway for a very long time, so why are you always asking questions like you just started using the platform last week over text this sounds rude, but i promise you i dont mean any ill intent
eirk
eirkOP•14mo ago
i rarely look at railway docs bc railway is so good that i dont need to make changes to my config, but when i do, i want to be very sure it does what i want it to do here, these config as code changes are something im not familiar bc i last touched them like a year ago
Brody
Brody•14mo ago
i see, thank you
eirk
eirkOP•14mo ago
i also have high expectations of railway in terms of service, docs, and reliability
Brody
Brody•14mo ago
oh are you on pro?
eirk
eirkOP•14mo ago
no
Brody
Brody•14mo ago
oh
eirk
eirkOP•14mo ago
i just mean that i dont expect railway to have major issues or problems with functionality
Brody
Brody•14mo ago
most of their problems are with the builder it seems, i have never had a running service go down where railway was at fault
eirk
eirkOP•14mo ago
same here, and i continue to expect that from railway
Brody
Brody•14mo ago
well tbh they dont have an SLA so you cant really expect it
eirk
eirkOP•14mo ago
true
Want results from more Discord servers?
Add your server