{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dd8a329f-8fc9-476b-8862-f42d5bbb7d68",
    "slug": "cerbos-authorization",
    "name": "Cerbos authorization",
    "description": "Policy-based authorization with Git-synced policies and secure decisions.",
    "url": "https://railway.com/deploy/cerbos-authorization",
    "upstream": {
      "image": "ghcr.io/cerbos/cerbos@sha256:211c261f6031675522a35c6055b13fd719c4aff13747307e4bcb6907326537ef"
    }
  },
  "services": [
    {
      "name": "Cerbos",
      "source": {
        "image": "ghcr.io/cerbos/cerbos@sha256:211c261f6031675522a35c6055b13fd719c4aff13747307e4bcb6907326537ef"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Cerbos",
      "description": "Railway HTTP routing and health-check port; keep this at 3592.",
      "secret": false,
      "strategy": "default",
      "default": "3592"
    },
    {
      "key": "CERBOS_POLICY_BRANCH",
      "service": "Cerbos",
      "description": "Git branch Cerbos clones and polls every 60 seconds.",
      "secret": false,
      "strategy": "default",
      "default": "main"
    },
    {
      "key": "CERBOS_POLICY_DIRECTORY",
      "service": "Cerbos",
      "description": "Directory inside the repository containing policies and schemas.",
      "secret": false,
      "strategy": "default",
      "default": "cerbos/policies"
    },
    {
      "key": "CERBOS_POLICY_REPOSITORY",
      "service": "Cerbos",
      "description": "Public HTTPS Git repository containing Cerbos policies.",
      "secret": false,
      "strategy": "default",
      "default": "https://github.com/cerbos/demo-rest.git"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "cerbos-authorization"
      }
    },
    "cli": "railway deploy --template cerbos-authorization",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dd8a329f-8fc9-476b-8862-f42d5bbb7d68",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "412e35af-3de2-4b14-860d-2a9d18cd3cd0": {
                  "icon": null,
                  "name": "Cerbos",
                  "deploy": {
                    "startCommand": "/cerbos server --set=storage.driver=git --set=storage.git.protocol=https --set=storage.git.url=$CERBOS_POLICY_REPOSITORY --set=storage.git.branch=$CERBOS_POLICY_BRANCH --set=storage.git.subDir=$CERBOS_POLICY_DIRECTORY --set=storage.git.checkoutDir=/tmp/cerbos-policies --set=storage.git.updatePollInterval=60s --set=storage.git.operationTimeout=30s --set=telemetry.disabled=true",
                    "healthcheckPath": "/_cerbos/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 120,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/cerbos/cerbos@sha256:211c261f6031675522a35c6055b13fd719c4aff13747307e4bcb6907326537ef"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Railway HTTP routing and health-check port; keep this at 3592.",
                      "defaultValue": "3592"
                    },
                    "CERBOS_POLICY_BRANCH": {
                      "isOptional": false,
                      "description": "Git branch Cerbos clones and polls every 60 seconds.",
                      "defaultValue": "main"
                    },
                    "CERBOS_POLICY_DIRECTORY": {
                      "isOptional": false,
                      "description": "Directory inside the repository containing policies and schemas.",
                      "defaultValue": "cerbos/policies"
                    },
                    "CERBOS_POLICY_REPOSITORY": {
                      "isOptional": false,
                      "description": "Public HTTPS Git repository containing Cerbos policies.",
                      "defaultValue": "https://github.com/cerbos/demo-rest.git"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 3592
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Cerbos",
      "method": "GET",
      "path": "/_cerbos/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T19:34:00.033Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f0dec709ac6f4017a3ea",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 18,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "Cerbos"
  }
}
