Horserix
Horserix
RRailway
Created by Horserix on 10/14/2023 in #✋|help
Deploy fails due to it not being able to check \health endpoint
The deploys are funky when triggered by new pushes to project's master branch. Sometimes they pass the check and some other times I just have to remove the previous active deploy and redeploy but even then the behavior is unpredictable. Some other times pushing a new change helped. I'm using golang (gin). router.Run(ip + ":" + port) where ip is 0.0.0.0 and port is defined as a service variable on port 8080. My deploy details are:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "./run.sh production-build"
},
"deploy": {
"numReplicas": 1,
"startCommand": "./main",
"healthcheckPath": "/health",
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "./run.sh production-build"
},
"deploy": {
"numReplicas": 1,
"startCommand": "./main",
"healthcheckPath": "/health",
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
buildCommand is basically: go get && go build -o main Would love help on this since it makes fixing an urgent issue a bit of a nightmare. Thanks!
35 replies