{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "builder": "nixpacks",
    "buildCommand": "chmod +x ./gradlew && ./gradlew clean build -x check -x test"
  },
  "deploy": {
    "startCommand": "java -jar -Dspring.profiles.active=production $(ls build/libs/*.jar | grep -v plain)",
    "restartPolicyType": "on_failure",
    "restartPolicyMaxRetries": 5,
    "healthchecks": {
      "startup": "/",
      "liveness": "/"
    }
  }
}
