{
  "manifest_version": "1.0.0",
  "template": {
    "id": "74ad38b9-43c4-44ae-a7d4-e3c8672cb2ae",
    "slug": "rota",
    "name": "Rota",
    "description": "Deploy Rota, an authenticated proxy rotation platform with TimescaleDB.",
    "url": "https://railway.com/deploy/rota",
    "upstream": {
      "repo_url": "https://github.com/monotykamary/railway-template-rota"
    }
  },
  "services": [
    {
      "name": "TimescaleDB",
      "source": {
        "image": "timescale/timescaledb:2.30.0-pg17@sha256:3113d12b78392c064aa7475caf7a52b447b29ddd4f9bfd23526733fcb03e3459"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Core",
      "source": {
        "repo": "https://github.com/monotykamary/railway-template-rota"
      },
      "needs_volume": false,
      "tcp_ports": [
        8000
      ],
      "http": false
    },
    {
      "name": "Dashboard",
      "source": {
        "image": "ghcr.io/alpkeskin/rota-dashboard:2.2.2@sha256:86b4eed8b7f40432198b40bf1a5de48d9a45acd30eb7d68f3c5c0e4f5a46886a"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Gateway",
      "source": {
        "repo": "https://github.com/monotykamary/railway-template-rota"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "TimescaleDB",
      "description": "Internal PostgreSQL listener port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGDATA",
      "service": "TimescaleDB",
      "description": "PostgreSQL data directory inside the persistent Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "TimescaleDB",
      "description": "Database name used by Rota.",
      "secret": false,
      "strategy": "default",
      "default": "rota"
    },
    {
      "key": "POSTGRES_USER",
      "service": "TimescaleDB",
      "description": "Database user created for Rota.",
      "secret": false,
      "strategy": "default",
      "default": "rota"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "TimescaleDB",
      "description": "Generated password shared with Core through a Railway service reference.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "TIMESCALEDB_TELEMETRY",
      "service": "TimescaleDB",
      "description": "Disables TimescaleDB telemetry for this self-hosted deployment.",
      "secret": false,
      "strategy": "default",
      "default": "off"
    },
    {
      "key": "PORT",
      "service": "Core",
      "description": "Port Railway uses for Core HTTP health checks.",
      "secret": false,
      "strategy": "default",
      "default": "8001"
    },
    {
      "key": "DB_HOST",
      "service": "Core",
      "description": "TimescaleDB private Railway hostname.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_NAME",
      "service": "Core",
      "description": "Database name referenced from TimescaleDB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Core",
      "description": "TimescaleDB private PostgreSQL port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DB_USER",
      "service": "Core",
      "description": "Database user referenced from TimescaleDB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "API_PORT",
      "service": "Core",
      "description": "Rota API listener port used by Gateway over private networking.",
      "secret": false,
      "strategy": "default",
      "default": "8001"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Core",
      "description": "Rota application log level.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "DB_SSLMODE",
      "service": "Core",
      "description": "Disables PostgreSQL TLS on Railway private networking.",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "PROXY_PORT",
      "service": "Core",
      "description": "Rota incoming HTTP proxy listener exposed through Railway TCP networking.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DB_PASSWORD",
      "service": "Core",
      "description": "Database password referenced from TimescaleDB.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ROTA_ADMIN_USER",
      "service": "Core",
      "description": "Initial Rota dashboard administrator username.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "ROTA_PROXY_USER",
      "service": "Core",
      "description": "Username required by clients of the public Rota TCP proxy.",
      "secret": false,
      "strategy": "default",
      "default": "rota"
    },
    {
      "key": "ROTA_ADMIN_PASSWORD",
      "service": "Core",
      "description": "Generated initial password for the Rota dashboard administrator.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ROTA_PROXY_PASSWORD",
      "service": "Core",
      "description": "Generated password required by clients of the public Rota TCP proxy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "TRUST_PROXY_HEADERS",
      "service": "Core",
      "description": "Trusts forwarding headers from the private Gateway for login rate limiting.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CORS_ALLOWED_ORIGINS",
      "service": "Core",
      "description": "Allowed API origins; Rota normally runs same-origin behind Gateway.",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "PORT",
      "service": "Dashboard",
      "description": "Private Next.js dashboard listener port used by Gateway.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "PORT",
      "service": "Gateway",
      "description": "Public Gateway listener port targeted by the Railway HTTPS domain.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "ROTA_CORE_HOST",
      "service": "Gateway",
      "description": "Core private Railway hostname for API, health, docs, and WebSockets.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ROTA_DASHBOARD_HOST",
      "service": "Gateway",
      "description": "Dashboard private Railway hostname for web routes.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "rota"
      }
    },
    "cli": "railway deploy --template rota",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "74ad38b9-43c4-44ae-a7d4-e3c8672cb2ae",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "11c38d03-f814-4e0a-9a0e-87224c0e32e7": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-rota/9d0582ab2de7eb0d73583293b6fee640aaa88501/assets/rota-icon.png",
                  "name": "TimescaleDB",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "timescale/timescaledb:2.30.0-pg17@sha256:3113d12b78392c064aa7475caf7a52b447b29ddd4f9bfd23526733fcb03e3459",
                    "autoUpdates": {
                      "type": "disabled"
                    }
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal PostgreSQL listener port.",
                      "defaultValue": "5432"
                    },
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PostgreSQL data directory inside the persistent Railway volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name used by Rota.",
                      "defaultValue": "rota"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user created for Rota.",
                      "defaultValue": "rota"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password shared with Core through a Railway service reference.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "TIMESCALEDB_TELEMETRY": {
                      "isOptional": false,
                      "description": "Disables TimescaleDB telemetry for this self-hosted deployment.",
                      "defaultValue": "off"
                    }
                  },
                  "volumeMounts": {
                    "11c38d03-f814-4e0a-9a0e-87224c0e32e7": {
                      "sizeMB": 5000,
                      "mountPath": "/var/lib/postgresql/data",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                },
                "742c6d33-ab30-46d8-94bd-06ed530b2996": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-rota/9d0582ab2de7eb0d73583293b6fee640aaa88501/assets/rota-icon.png",
                  "name": "Core",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/monotykamary/railway-template-rota",
                    "commitSha": "9d0582ab2de7eb0d73583293b6fee640aaa88501",
                    "autoUpdates": {
                      "type": "disabled"
                    },
                    "checkSuites": false,
                    "rootDirectory": "core"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway uses for Core HTTP health checks.",
                      "defaultValue": "8001"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "TimescaleDB private Railway hostname.",
                      "defaultValue": "${{TimescaleDB.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "Database name referenced from TimescaleDB.",
                      "defaultValue": "${{TimescaleDB.POSTGRES_DB}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "TimescaleDB private PostgreSQL port.",
                      "defaultValue": "5432"
                    },
                    "DB_USER": {
                      "isOptional": false,
                      "description": "Database user referenced from TimescaleDB.",
                      "defaultValue": "${{TimescaleDB.POSTGRES_USER}}"
                    },
                    "API_PORT": {
                      "isOptional": false,
                      "description": "Rota API listener port used by Gateway over private networking.",
                      "defaultValue": "8001"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Rota application log level.",
                      "defaultValue": "info"
                    },
                    "DB_SSLMODE": {
                      "isOptional": false,
                      "description": "Disables PostgreSQL TLS on Railway private networking.",
                      "defaultValue": "disable"
                    },
                    "PROXY_PORT": {
                      "isOptional": false,
                      "description": "Rota incoming HTTP proxy listener exposed through Railway TCP networking.",
                      "defaultValue": "8000"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password referenced from TimescaleDB.",
                      "defaultValue": "${{TimescaleDB.POSTGRES_PASSWORD}}"
                    },
                    "ROTA_ADMIN_USER": {
                      "isOptional": false,
                      "description": "Initial Rota dashboard administrator username.",
                      "defaultValue": "admin"
                    },
                    "ROTA_PROXY_USER": {
                      "isOptional": false,
                      "description": "Username required by clients of the public Rota TCP proxy.",
                      "defaultValue": "rota"
                    },
                    "ROTA_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated initial password for the Rota dashboard administrator.",
                      "defaultValue": "{{ROTA_ADMIN_PASSWORD}}"
                    },
                    "ROTA_PROXY_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password required by clients of the public Rota TCP proxy.",
                      "defaultValue": "{{ROTA_PROXY_PASSWORD}}"
                    },
                    "TRUST_PROXY_HEADERS": {
                      "isOptional": false,
                      "description": "Trusts forwarding headers from the private Gateway for login rate limiting.",
                      "defaultValue": "true"
                    },
                    "CORS_ALLOWED_ORIGINS": {
                      "isOptional": false,
                      "description": "Allowed API origins; Rota normally runs same-origin behind Gateway.",
                      "defaultValue": "*"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "8000": {}
                    }
                  }
                },
                "75e21abc-c470-4f29-836d-16758811814f": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-rota/9d0582ab2de7eb0d73583293b6fee640aaa88501/assets/rota-icon.png",
                  "name": "Dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/login",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 180,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/alpkeskin/rota-dashboard:2.2.2@sha256:86b4eed8b7f40432198b40bf1a5de48d9a45acd30eb7d68f3c5c0e4f5a46886a",
                    "autoUpdates": {
                      "type": "disabled"
                    }
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Private Next.js dashboard listener port used by Gateway.",
                      "defaultValue": "3000"
                    }
                  }
                },
                "bcab1959-8d60-42e9-987c-9faa86ee4a05": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-rota/9d0582ab2de7eb0d73583293b6fee640aaa88501/assets/rota-icon.png",
                  "name": "Gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/monotykamary/railway-template-rota",
                    "commitSha": "9d0582ab2de7eb0d73583293b6fee640aaa88501",
                    "autoUpdates": {
                      "type": "disabled"
                    },
                    "checkSuites": false,
                    "rootDirectory": "gateway"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Public Gateway listener port targeted by the Railway HTTPS domain.",
                      "defaultValue": "8080"
                    },
                    "ROTA_CORE_HOST": {
                      "isOptional": false,
                      "description": "Core private Railway hostname for API, health, docs, and WebSockets.",
                      "defaultValue": "${{Core.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "ROTA_DASHBOARD_HOST": {
                      "isOptional": false,
                      "description": "Dashboard private Railway hostname for web routes.",
                      "defaultValue": "${{Dashboard.RAILWAY_PRIVATE_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Gateway",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T17:06:22.125Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_3fb1049950884fc39697",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 66,
    "typical_build_seconds": 10,
    "typical_start_seconds": 10,
    "slowest_service": "Gateway"
  }
}
