{
  "manifest_version": "1.0.0",
  "template": {
    "id": "3131a1e4-ce17-426a-b8d8-e129da1424bf",
    "slug": "xberg-kreuzberg-do-1",
    "name": "Xberg / Kreuzberg Document API",
    "description": "CPU document extraction API with authenticated HTTPS access.",
    "url": "https://railway.com/deploy/xberg-kreuzberg-do-1",
    "upstream": {
      "repo_url": "https://github.com/orenaksakal/railway-templates"
    }
  },
  "services": [
    {
      "name": "extractor",
      "source": {
        "image": "ghcr.io/xberg-io/xberg:1.1.2@sha256:33ce549f7730212336a60048335fc059be4a838bf415b96321906428c847ce60"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "xberg",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "xberg",
      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "ACCESS_USER",
      "service": "xberg",
      "description": "Access user for xberg. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "UPSTREAM_HOST",
      "service": "xberg",
      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "UPSTREAM_PORT",
      "service": "xberg",
      "description": "Upstream port for xberg. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "ACCESS_PASSWORD",
      "service": "xberg",
      "description": "Generated access password. Keep private and preserve with backups.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "xberg",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "shared/round4-gateway/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "xberg-kreuzberg-do-1"
      }
    },
    "cli": "railway deploy --template xberg-kreuzberg-do-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "3131a1e4-ce17-426a-b8d8-e129da1424bf",
            "serializedConfig": {
              "services": {
                "3f2b28b8-ddd6-5700-8375-7461c4709a26": {
                  "name": "extractor",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/xberg-io/xberg:1.1.2@sha256:33ce549f7730212336a60048335fc059be4a838bf415b96321906428c847ce60"
                  },
                  "variables": {},
                  "networking": {
                    "serviceDomains": {}
                  }
                },
                "6bc9381d-c1b1-5bca-a204-f169c9d2dfb4": {
                  "name": "xberg",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "shared/round4-gateway/Dockerfile"
                  },
                  "deploy": {
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "orenaksakal/railway-templates",
                    "branch": "main"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
                      "defaultValue": "8080"
                    },
                    "ACCESS_USER": {
                      "isOptional": false,
                      "description": "Access user for xberg. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "admin"
                    },
                    "UPSTREAM_HOST": {
                      "isOptional": false,
                      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{extractor.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "UPSTREAM_PORT": {
                      "isOptional": false,
                      "description": "Upstream port for xberg. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "8000"
                    },
                    "ACCESS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated access password. Keep private and preserve with backups.",
                      "defaultValue": "{{ACCESS_PASSWORD}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
                      "defaultValue": "shared/round4-gateway/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "xberg",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": false
  },
  "generated_at": "2026-09-24T04:14:44.625Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-22T17:44:52.372Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_486d178339324c4ab693",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 100,
    "typical_build_seconds": 12,
    "typical_start_seconds": 10,
    "slowest_service": "xberg"
  }
}
