{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a81f389f-41d4-493a-9c43-d673c893ff2a",
    "slug": "telegram-bot-api-gateway",
    "name": "Telegram Bot API Gateway",
    "description": "Self-hosted Telegram Bot API gateway, register bot tokens in a web admin.",
    "url": "https://railway.com/deploy/telegram-bot-api-gateway",
    "upstream": {
      "image": "ghcr.io/tailabs/tgbot-gate:latest"
    }
  },
  "services": [
    {
      "name": "tgbot-gate",
      "source": {
        "image": "ghcr.io/tailabs/tgbot-gate:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "ADMIN_PASSWORD",
      "service": "tgbot-gate",
      "description": "The password for the web admin UI (/admin). The server checks it when you log in, and issues an HTTP-only session cookie backed by an internal random session token (that token is not an env var).",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "telegram-bot-api-gateway"
      }
    },
    "cli": "railway deploy --template telegram-bot-api-gateway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a81f389f-41d4-493a-9c43-d673c893ff2a",
            "serializedConfig": {
              "services": {
                "71cb18f4-9047-4292-a834-04d4335d0898": {
                  "icon": "https://devicons.railway.app/telegram",
                  "name": "tgbot-gate",
                  "deploy": {
                    "healthcheckPath": "/healthz"
                  },
                  "source": {
                    "image": "ghcr.io/tailabs/tgbot-gate:latest"
                  },
                  "variables": {
                    "ADMIN_PASSWORD": {
                      "isOptional": true,
                      "description": "The password for the web admin UI (/admin). The server checks it when you log in, and issues an HTTP-only session cookie backed by an internal random session token (that token is not an env var).",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "71cb18f4-9047-4292-a834-04d4335d0898": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "tgbot-gate",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-09T06:22:45.745Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_b337c64f0dc34cbf999f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED"
      }
    ]
  }
}
