{
  "manifest_version": "1.0.0",
  "template": {
    "id": "685088bf-4c79-44a3-9dfa-72d58b8bfa69",
    "slug": "railway-uptime-mon-1",
    "name": "Railway Uptime Monitor",
    "description": "Railway uptime monitor with alerts for private/public services",
    "url": "https://railway.com/deploy/railway-uptime-mon-1",
    "upstream": {
      "repo_url": "https://github.com/joe-yeomans/railway-uptime-monitor"
    }
  },
  "services": [
    {
      "name": "railway-uptime-monitor",
      "source": {
        "repo": "https://github.com/joe-yeomans/railway-uptime-monitor"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "railway-uptime-monitor",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DATABASE_PATH",
      "service": "railway-uptime-monitor",
      "description": "SQLite database file path for monitors/incidents state",
      "secret": false,
      "strategy": "default",
      "default": "monitor.db"
    },
    {
      "key": "CHECK_TIMEOUT_MS",
      "service": "railway-uptime-monitor",
      "description": "Timeout per HTTP check (milliseconds).",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "HEALTHCHECK_PATH",
      "service": "railway-uptime-monitor",
      "description": "Path served by this app for its own health endpoint. Must start with /.",
      "secret": false,
      "strategy": "default",
      "default": "/healthz"
    },
    {
      "key": "FAILURE_THRESHOLD",
      "service": "railway-uptime-monitor",
      "description": "Consecutive failed checks before marking a service DOWN.",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "RAILWAY_API_TOKEN",
      "service": "railway-uptime-monitor",
      "description": "Railway API token (ra_...) used to query project services.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RECOVERY_THRESHOLD",
      "service": "railway-uptime-monitor",
      "description": "Consecutive successful checks before marking a service RECOVERED.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "EXPECTED_STATUS_MAX",
      "service": "railway-uptime-monitor",
      "description": "Maximum acceptable HTTP status code.",
      "secret": false,
      "strategy": "default",
      "default": "299"
    },
    {
      "key": "EXPECTED_STATUS_MIN",
      "service": "railway-uptime-monitor",
      "description": "Minimum acceptable HTTP status code.",
      "secret": false,
      "strategy": "default",
      "default": "200"
    },
    {
      "key": "CHECK_INTERVAL_SECONDS",
      "service": "railway-uptime-monitor",
      "description": "How often monitor checks run.",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "DISCOVERY_INTERVAL_SECONDS",
      "service": "railway-uptime-monitor",
      "description": "How often to rediscover Railway services to monitor.",
      "secret": false,
      "strategy": "default",
      "default": "120"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "railway-uptime-mon-1"
      }
    },
    "cli": "railway deploy --template railway-uptime-mon-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "685088bf-4c79-44a3-9dfa-72d58b8bfa69",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "ffa81cab-853e-48e8-b18f-0dd4132c205a": {
                  "icon": "https://raw.githubusercontent.com/joe-yeomans/railway-uptime-monitor/main/icon.png",
                  "name": "railway-uptime-monitor",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/joe-yeomans/railway-uptime-monitor",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "DATABASE_PATH": {
                      "isOptional": true,
                      "description": "SQLite database file path for monitors/incidents state",
                      "defaultValue": "monitor.db"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Resend API key for email alerts. Used only if all Resend vars are set.",
                      "defaultValue": ""
                    },
                    "RESEND_TO_EMAIL": {
                      "isOptional": true,
                      "description": "Recipient email address for Resend notifications.",
                      "defaultValue": ""
                    },
                    "CHECK_TIMEOUT_MS": {
                      "isOptional": true,
                      "description": "Timeout per HTTP check (milliseconds).",
                      "defaultValue": "5000"
                    },
                    "HEALTHCHECK_PATH": {
                      "isOptional": true,
                      "description": "Path served by this app for its own health endpoint. Must start with /.",
                      "defaultValue": "/healthz"
                    },
                    "TELEGRAM_CHAT_ID": {
                      "isOptional": true,
                      "description": "Telegram chat ID for alert messages.",
                      "defaultValue": ""
                    },
                    "FAILURE_THRESHOLD": {
                      "isOptional": true,
                      "description": "Consecutive failed checks before marking a service DOWN.",
                      "defaultValue": "3"
                    },
                    "RAILWAY_API_TOKEN": {
                      "isOptional": false,
                      "description": "Railway API token (ra_...) used to query project services.",
                      "defaultValue": "{{RAILWAY_API_TOKEN}}"
                    },
                    "RESEND_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "Sender email address for Resend notifications.",
                      "defaultValue": ""
                    },
                    "SLACK_WEBHOOK_URL": {
                      "isOptional": true,
                      "description": "Slack incoming webhook for DOWN/RECOVERED alerts.",
                      "defaultValue": ""
                    },
                    "RECOVERY_THRESHOLD": {
                      "isOptional": true,
                      "description": "Consecutive successful checks before marking a service RECOVERED.",
                      "defaultValue": "2"
                    },
                    "TELEGRAM_BOT_TOKEN": {
                      "isOptional": true,
                      "description": "Telegram bot token. Used only if TELEGRAM_CHAT_ID is also set.",
                      "defaultValue": ""
                    },
                    "DISCORD_WEBHOOK_URL": {
                      "isOptional": true,
                      "description": "Discord webhook for DOWN/RECOVERED alerts.",
                      "defaultValue": ""
                    },
                    "EXPECTED_STATUS_MAX": {
                      "isOptional": true,
                      "description": "Maximum acceptable HTTP status code.",
                      "defaultValue": "299"
                    },
                    "EXPECTED_STATUS_MIN": {
                      "isOptional": true,
                      "description": "Minimum acceptable HTTP status code.",
                      "defaultValue": "200"
                    },
                    "CHECK_INTERVAL_SECONDS": {
                      "isOptional": true,
                      "description": "How often monitor checks run.",
                      "defaultValue": "30"
                    },
                    "DISCOVERY_INTERVAL_SECONDS": {
                      "isOptional": true,
                      "description": "How often to rediscover Railway services to monitor.",
                      "defaultValue": "120"
                    }
                  },
                  "volumeMounts": {
                    "ffa81cab-853e-48e8-b18f-0dd4132c205a": {
                      "mountPath": "/data",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-20T20:18:29.271Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_2d5d5716a84b400e9991",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": false,
        "detail": "1 service(s) crashed within 30s"
      }
    ]
  }
}
