{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9ac2c050-a8da-46e0-82a1-9cbb1a88752a",
    "slug": "switchyard",
    "name": "Switchyard",
    "description": "Pluggable infrastructure platform. Autoscaling, job scheduling, and more.",
    "url": "https://railway.com/deploy/switchyard",
    "upstream": {
      "image": "ghcr.io/brody192/railway-public-to-private-proxy"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "bitnami/redis:7.2.5"
      },
      "needs_volume": true,
      "volume_mount_path": "/bitnami",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "autoscaler",
      "source": {
        "image": "ghcr.io/ferretcode/switchyard/autoscale"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "dashboard",
      "source": {
        "image": "ghcr.io/ferretcode/switchyard/dashboard"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "configurator",
      "source": {
        "image": "ghcr.io/ferretcode/switchyard/configurator"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "scheduler",
      "source": {
        "image": "ghcr.io/ferretcode/switchyard/scheduler"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "incident",
      "source": {
        "image": "ghcr.io/ferretcode/switchyard/incident"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "feature-flags",
      "source": {
        "image": "ghcr.io/ferretcode/switchyard/feature-flags"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "locomotive",
      "source": {
        "image": "ghcr.io/ferretcode/locomotive:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "RabbitMQ",
      "source": {
        "image": "rabbitmq:management"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/rabbitmq",
      "http": false
    },
    {
      "name": "RabbitMQ Web UI",
      "source": {
        "image": "ghcr.io/brody192/railway-public-to-private-proxy"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default user to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "URL to connect to Redis over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Redis",
      "description": "Start Redis process as root to allow for writing to the volume",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public URL to connect to Redis, needed for the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_RDB_POLICY",
      "service": "Redis",
      "description": "Set a RDB snapshot policy.",
      "secret": false,
      "strategy": "default",
      "default": "3600#1 300#100 60#10000"
    },
    {
      "key": "REDIS_AOF_ENABLED",
      "service": "Redis",
      "description": "Disable writing to AOF file.",
      "secret": false,
      "strategy": "default",
      "default": "no"
    },
    {
      "key": "RAILWAY_RUN_AS_ROOT",
      "service": "Redis",
      "description": "Start Redis process as root to allow for writing to the volume",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PORT",
      "service": "autoscaler",
      "description": "Autoscaler port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "DATABASE_URL",
      "service": "autoscaler",
      "description": "URL to the Postgres Database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_API_KEY",
      "service": "autoscaler",
      "description": "Railway API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "UPSCALE_COOLDOWN",
      "service": "autoscaler",
      "description": "Default cooldown for upscaling services",
      "secret": false,
      "strategy": "default",
      "default": "1m"
    },
    {
      "key": "MAX_REPLICA_COUNT",
      "service": "autoscaler",
      "description": "Default max service replica count",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "MIN_REPLICA_COUNT",
      "service": "autoscaler",
      "description": "Default min service replica count",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "DOWNSCALE_COOLDOWN",
      "service": "autoscaler",
      "description": "Default downscale cooldown for services",
      "secret": false,
      "strategy": "default",
      "default": "2m"
    },
    {
      "key": "METRIC_HISTORY_SIZE",
      "service": "autoscaler",
      "description": "Sliding window for metrics history analysis",
      "secret": false,
      "strategy": "default",
      "default": "12"
    },
    {
      "key": "MONITORING_INTERVAL",
      "service": "autoscaler",
      "description": "Metrics polling interval",
      "secret": false,
      "strategy": "default",
      "default": "10s"
    },
    {
      "key": "RAILWAY_SELECTED_REGION",
      "service": "autoscaler",
      "description": "Railway region name",
      "secret": false,
      "strategy": "default",
      "default": "us-west2"
    },
    {
      "key": "RAILWAY_CPU_UPSCALE_THRESHOLD",
      "service": "autoscaler",
      "description": "Default CPU upscaling threshold (%)",
      "secret": false,
      "strategy": "default",
      "default": "0.80"
    },
    {
      "key": "RAILWAY_CPU_DOWNSCALE_THRESHOLD",
      "service": "autoscaler",
      "description": "Default CPU downscale threshold (%)",
      "secret": false,
      "strategy": "default",
      "default": "0.20"
    },
    {
      "key": "RAILWAY_MEMORY_UPSCALE_THRESHOLD",
      "service": "autoscaler",
      "description": "Default memory upscale threshold (%)",
      "secret": false,
      "strategy": "default",
      "default": "0.80"
    },
    {
      "key": "RAILWAY_MEMORY_DOWNSCALE_THRESHOLD",
      "service": "autoscaler",
      "description": "Default memory downscale threshold",
      "secret": false,
      "strategy": "default",
      "default": "0.20"
    },
    {
      "key": "PORT",
      "service": "dashboard",
      "description": "Dashboard port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "dashboard",
      "description": "Dashboard password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_USERNAME",
      "service": "dashboard",
      "description": "Admin username for the dashboard",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "SESSIONS_COOKIE_NAME",
      "service": "dashboard",
      "description": "Browser cookie name for session management",
      "secret": false,
      "strategy": "default",
      "default": "switchyard"
    },
    {
      "key": "AUTOSCALE_SERVICE_URL",
      "service": "dashboard",
      "description": "Autoscaler service URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SCHEDULER_SERVICE_URL",
      "service": "dashboard",
      "description": "Scheduler service URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FEATURE_FLAGS_SERVICE_URL",
      "service": "dashboard",
      "description": "Feature flags service URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INCIDENT_REPORTING_SERVICE_URL",
      "service": "dashboard",
      "description": "Incident service port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "configurator",
      "description": "Configurator service port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "ENVIRONMENT",
      "service": "configurator",
      "description": "Running environment (should always be prod, so database migrations run)",
      "secret": false,
      "strategy": "default",
      "default": "prod"
    },
    {
      "key": "DATABASE_URL",
      "service": "configurator",
      "description": "Postgres database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_API_KEY",
      "service": "configurator",
      "description": "Railway API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PORT",
      "service": "scheduler",
      "description": "Scheduler port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "CACHE_URL",
      "service": "scheduler",
      "description": "Redis URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "scheduler",
      "description": "Postgres database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MESSAGE_BUS_URL",
      "service": "scheduler",
      "description": "RabbitMQ message bus URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORKER_MAX_JOB_RETRIES",
      "service": "scheduler",
      "description": "Number of retries before marking a job as failed",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "WORKER_STUCK_JOB_THRESHOLD",
      "service": "scheduler",
      "description": "Interval at which the scheduler polls for stuck jobs",
      "secret": false,
      "strategy": "default",
      "default": "15s"
    },
    {
      "key": "WORKER_UNACKED_MESSAGE_COUNT",
      "service": "scheduler",
      "description": "Maximum number of messages per worker that can be unacknowledged at a time",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "PORT",
      "service": "incident",
      "description": "Incident service port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "DATABASE_URL",
      "service": "incident",
      "description": "Postgres database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MESSAGE_BUS_URL",
      "service": "incident",
      "description": "RabbitMQ message bus URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_API_KEY",
      "service": "incident",
      "description": "Railway API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "INCIDENT_ANALYSIS_WINDOW",
      "service": "incident",
      "description": "The window in which error logs are considered towards the error threshold",
      "secret": false,
      "strategy": "default",
      "default": "15s"
    },
    {
      "key": "SERVICE_MONITOR_POLLING_RATE",
      "service": "incident",
      "description": "Interval at which to poll interested service statuses",
      "secret": false,
      "strategy": "default",
      "default": "15s"
    },
    {
      "key": "SERVICE_MONITOR_POLLING_TIMEOUT",
      "service": "incident",
      "description": "Deadline for service monitor requests to complete in",
      "secret": false,
      "strategy": "default",
      "default": "5s"
    },
    {
      "key": "INCIDENT_ANALYSIS_ERROR_THRESHOLD",
      "service": "incident",
      "description": "Number of error logs to allow before alerting",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "SERVICE_MONITOR_INTERESTED_STATUS_CHANGES",
      "service": "incident",
      "description": "Interesting deployment status changes to alert on",
      "secret": false,
      "strategy": "default",
      "default": "FAILED,CRASHED"
    },
    {
      "key": "PORT",
      "service": "feature-flags",
      "description": "Feature flags port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "DATABASE_URL",
      "service": "feature-flags",
      "description": "Postgres database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "INGEST_URL",
      "service": "locomotive",
      "description": "Ingest URL for the incident service. Don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOGS_FILTER",
      "service": "locomotive",
      "description": "Which logs you want sent (either ALL, INFO, ERROR, WARN or any custom severity)",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "ENVIRONMENT_ID",
      "service": "locomotive",
      "description": "The environment ID your service is in (Ctrl+K -> Copy environment ID)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_API_KEY",
      "service": "locomotive",
      "description": "Railway API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ENABLE_HTTP_LOGS",
      "service": "locomotive",
      "description": "Whether to enable HTTP logs.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LOGS_FILTER_LOKI",
      "service": "locomotive",
      "description": "Loki logs filter",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "ENABLE_DEPLOY_LOGS",
      "service": "locomotive",
      "description": "Whether to ship deploy logs",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LOGS_FILTER_DISCORD",
      "service": "locomotive",
      "description": "Discord logs filter",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "LOGS_FILTER_WEBHOOK",
      "service": "locomotive",
      "description": "Webhook log filters",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "REPORT_STATUS_EVERY",
      "service": "locomotive",
      "description": "Reports the status of the locomotive every X seconds",
      "secret": false,
      "strategy": "default",
      "default": "5s"
    },
    {
      "key": "MAX_ERR_ACCUMULATIONS",
      "service": "locomotive",
      "description": "The maximum number of errors to occur before exiting.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "RABBITMQ_URL",
      "service": "RabbitMQ",
      "description": "RabbitMQ URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RABBITMQ_NODENAME",
      "service": "RabbitMQ",
      "description": "Hostname for RabbitMQ (Don't change this).",
      "secret": false,
      "strategy": "default",
      "default": "rabbit@rabbitmq"
    },
    {
      "key": "RABBITMQ_PRIVATE_URL",
      "service": "RabbitMQ",
      "description": "RabbitMQ Private URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RABBITMQ_DEFAULT_PASS",
      "service": "RabbitMQ",
      "description": "RabbitMQ default password",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RABBITMQ_DEFAULT_USER",
      "service": "RabbitMQ",
      "description": "RabbitMQ Default User",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PROXY_HOST",
      "service": "RabbitMQ Web UI",
      "description": "Provide a value for PROXY_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PROXY_PORT",
      "service": "RabbitMQ Web UI",
      "description": "RabbitMQ Management UI port",
      "secret": false,
      "strategy": "default",
      "default": "15672"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "switchyard"
      }
    },
    "cli": "railway deploy --template switchyard",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9ac2c050-a8da-46e0-82a1-9cbb1a88752a",
            "serializedConfig": {
              "services": {
                "2959a89b-8438-4769-af56-bd5cc33f4ea5": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "Redis",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/bitnami"
                  },
                  "source": {
                    "image": "bitnami/redis:7.2.5"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{ RAILWAY_PRIVATE_DOMAIN }}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Redis.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default user to connect to Redis.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Redis over the private network.",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_PRIVATE_DOMAIN }}:6379"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis.",
                      "defaultValue": "${{ REDIS_PASSWORD }}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Start Redis process as root to allow for writing to the volume",
                      "defaultValue": "0"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Public URL to connect to Redis, needed for the Data panel.",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    },
                    "REDIS_RDB_POLICY": {
                      "description": "Set a RDB snapshot policy.",
                      "defaultValue": "3600#1 300#100 60#10000"
                    },
                    "REDIS_AOF_ENABLED": {
                      "description": "Disable writing to AOF file.",
                      "defaultValue": "no"
                    },
                    "RAILWAY_RUN_AS_ROOT": {
                      "isOptional": false,
                      "description": "Start Redis process as root to allow for writing to the volume",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "2959a89b-8438-4769-af56-bd5cc33f4ea5": {
                      "mountPath": "/bitnami"
                    }
                  }
                },
                "2b71bbde-45ab-4add-8610-95cd69e2be9a": {
                  "icon": "https://img.icons8.com/?size=1000&id=A2sfeYasHHVe&format=png&color=ae3ec9",
                  "name": "autoscaler",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/switchyard/autoscale"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Autoscaler port",
                      "defaultValue": "3000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to the Postgres Database",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "RAILWAY_API_KEY": {
                      "isOptional": false,
                      "description": "Railway API key",
                      "defaultValue": "{{RAILWAY_API_KEY}}"
                    },
                    "UPSCALE_COOLDOWN": {
                      "isOptional": false,
                      "description": "Default cooldown for upscaling services",
                      "defaultValue": "1m"
                    },
                    "MAX_REPLICA_COUNT": {
                      "isOptional": false,
                      "description": "Default max service replica count",
                      "defaultValue": "10"
                    },
                    "MIN_REPLICA_COUNT": {
                      "isOptional": false,
                      "description": "Default min service replica count",
                      "defaultValue": "1"
                    },
                    "DOWNSCALE_COOLDOWN": {
                      "isOptional": false,
                      "description": "Default downscale cooldown for services",
                      "defaultValue": "2m"
                    },
                    "METRIC_HISTORY_SIZE": {
                      "isOptional": false,
                      "description": "Sliding window for metrics history analysis",
                      "defaultValue": "12"
                    },
                    "MONITORING_INTERVAL": {
                      "isOptional": false,
                      "description": "Metrics polling interval",
                      "defaultValue": "10s"
                    },
                    "RAILWAY_SELECTED_REGION": {
                      "isOptional": false,
                      "description": "Railway region name",
                      "defaultValue": "us-west2"
                    },
                    "RAILWAY_CPU_UPSCALE_THRESHOLD": {
                      "isOptional": false,
                      "description": "Default CPU upscaling threshold (%)",
                      "defaultValue": "0.80"
                    },
                    "RAILWAY_CPU_DOWNSCALE_THRESHOLD": {
                      "isOptional": false,
                      "description": "Default CPU downscale threshold (%)",
                      "defaultValue": "0.20"
                    },
                    "RAILWAY_MEMORY_UPSCALE_THRESHOLD": {
                      "isOptional": false,
                      "description": "Default memory upscale threshold (%)",
                      "defaultValue": "0.80"
                    },
                    "RAILWAY_MEMORY_DOWNSCALE_THRESHOLD": {
                      "isOptional": false,
                      "description": "Default memory downscale threshold",
                      "defaultValue": "0.20"
                    }
                  }
                },
                "2dac52a4-4f97-497a-9fd4-7a0a1aa1bbfe": {
                  "icon": "https://img.icons8.com/?size=100&id=10245&format=png&color=ae3ec9",
                  "name": "dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/switchyard/dashboard"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Dashboard port",
                      "defaultValue": "3000"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Dashboard password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "Admin username for the dashboard",
                      "defaultValue": "admin"
                    },
                    "SESSIONS_COOKIE_NAME": {
                      "isOptional": false,
                      "description": "Browser cookie name for session management",
                      "defaultValue": "switchyard"
                    },
                    "AUTOSCALE_SERVICE_URL": {
                      "isOptional": false,
                      "description": "Autoscaler service URL",
                      "defaultValue": "http://autoscaler.railway.internal:${{autoscaler.PORT}}"
                    },
                    "SCHEDULER_SERVICE_URL": {
                      "isOptional": false,
                      "description": "Scheduler service URL",
                      "defaultValue": "http://scheduler.railway.internal:${{scheduler.PORT}}"
                    },
                    "FEATURE_FLAGS_SERVICE_URL": {
                      "isOptional": false,
                      "description": "Feature flags service URL",
                      "defaultValue": "http://feature-flags.railway.internal:${{feature-flags.PORT}}"
                    },
                    "INCIDENT_REPORTING_SERVICE_URL": {
                      "isOptional": false,
                      "description": "Incident service port",
                      "defaultValue": "http://incident.railway.internal:${{incident.PORT}}"
                    }
                  }
                },
                "3854afa7-dde2-467f-b904-be28eb759335": {
                  "icon": "https://img.icons8.com/?size=100&id=12647&format=png&color=ae3ec9",
                  "name": "configurator",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/switchyard/configurator"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Configurator service port",
                      "defaultValue": "3000"
                    },
                    "ENVIRONMENT": {
                      "isOptional": false,
                      "description": "Running environment (should always be prod, so database migrations run)",
                      "defaultValue": "prod"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres database URL",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "RAILWAY_API_KEY": {
                      "isOptional": false,
                      "description": "Railway API key",
                      "defaultValue": "{{RAILWAY_API_KEY}}"
                    }
                  }
                },
                "63f4bf53-81a4-49e8-a76b-440779033ae0": {
                  "icon": "https://img.icons8.com/?size=100&id=10053&format=png&color=ae3ec9",
                  "name": "scheduler",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/switchyard/scheduler"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Scheduler port",
                      "defaultValue": "3000"
                    },
                    "CACHE_URL": {
                      "isOptional": false,
                      "description": "Redis URL",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres database URL",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "MESSAGE_BUS_URL": {
                      "isOptional": false,
                      "description": "RabbitMQ message bus URL",
                      "defaultValue": "${{RabbitMQ.RABBITMQ_PRIVATE_URL}}"
                    },
                    "WORKER_MAX_JOB_RETRIES": {
                      "isOptional": false,
                      "description": "Number of retries before marking a job as failed",
                      "defaultValue": "3"
                    },
                    "WORKER_STUCK_JOB_THRESHOLD": {
                      "isOptional": false,
                      "description": "Interval at which the scheduler polls for stuck jobs",
                      "defaultValue": "15s"
                    },
                    "WORKER_UNACKED_MESSAGE_COUNT": {
                      "isOptional": false,
                      "description": "Maximum number of messages per worker that can be unacknowledged at a time",
                      "defaultValue": "5"
                    }
                  }
                },
                "8655922b-82c8-47bb-8e1a-c42880429405": {
                  "icon": "https://img.icons8.com/?size=100&id=8773&format=png&color=ae3ec9",
                  "name": "incident",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/switchyard/incident"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Incident service port",
                      "defaultValue": "3000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres database URL",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "MESSAGE_BUS_URL": {
                      "isOptional": false,
                      "description": "RabbitMQ message bus URL",
                      "defaultValue": "${{RabbitMQ.RABBITMQ_PRIVATE_URL}}"
                    },
                    "RAILWAY_API_KEY": {
                      "isOptional": false,
                      "description": "Railway API key",
                      "defaultValue": "{{RAILWAY_API_KEY}}"
                    },
                    "RAILWAY_SERVICE_IDS": {
                      "isOptional": true,
                      "description": "Railway service IDs to monitor",
                      "defaultValue": ""
                    },
                    "INCIDENT_ANALYSIS_WINDOW": {
                      "isOptional": false,
                      "description": "The window in which error logs are considered towards the error threshold",
                      "defaultValue": "15s"
                    },
                    "INCIDENT_REPORT_WEBHOOK_URL": {
                      "isOptional": true,
                      "description": "Incident reporting webhook handler URL",
                      "defaultValue": ""
                    },
                    "SERVICE_MONITOR_POLLING_RATE": {
                      "isOptional": false,
                      "description": "Interval at which to poll interested service statuses",
                      "defaultValue": "15s"
                    },
                    "SERVICE_MONITOR_POLLING_TIMEOUT": {
                      "isOptional": false,
                      "description": "Deadline for service monitor requests to complete in",
                      "defaultValue": "5s"
                    },
                    "INCIDENT_ANALYSIS_ERROR_THRESHOLD": {
                      "isOptional": false,
                      "description": "Number of error logs to allow before alerting",
                      "defaultValue": "5"
                    },
                    "INCIDENT_REPORT_ADDITIONAL_HEADERS": {
                      "isOptional": true,
                      "description": "Additional headers to send to the webhoo url. In cookie format (e.g., Authorization=Bearer test;Another=another).",
                      "defaultValue": ""
                    },
                    "SERVICE_MONITOR_INTERESTED_STATUS_CHANGES": {
                      "isOptional": false,
                      "description": "Interesting deployment status changes to alert on",
                      "defaultValue": "FAILED,CRASHED"
                    }
                  }
                },
                "a17920ab-4254-4f5d-a2eb-432c44685912": {
                  "icon": "https://img.icons8.com/?size=100&id=100900&format=png&color=ae3ec9",
                  "name": "feature-flags",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/switchyard/feature-flags"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Feature flags port",
                      "defaultValue": "3000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres database URL",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  }
                },
                "b6d2dd1a-1e81-4367-b6bd-ef9902af43b9": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b6d2dd1a-1e81-4367-b6bd-ef9902af43b9": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "c241ca50-b218-4638-b5fc-70fcf3c59c92": {
                  "icon": null,
                  "name": "locomotive",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/ferretcode/locomotive:latest"
                  },
                  "variables": {
                    "TRAIN": {
                      "isOptional": true,
                      "description": "Service IDs. Comma separated",
                      "defaultValue": ""
                    },
                    "INGEST_URL": {
                      "isOptional": false,
                      "description": "Ingest URL for the incident service. Don't change.",
                      "defaultValue": "http://incident.internal.railway:${{incident.PORT}}/incident/ingest"
                    },
                    "LOGS_FILTER": {
                      "isOptional": true,
                      "description": "Which logs you want sent (either ALL, INFO, ERROR, WARN or any custom severity)",
                      "defaultValue": "all"
                    },
                    "ENVIRONMENT_ID": {
                      "isOptional": false,
                      "description": "The environment ID your service is in (Ctrl+K -> Copy environment ID)",
                      "defaultValue": "${{RAILWAY_ENVIRONMENT_ID}}"
                    },
                    "LOKI_INGEST_URL": {
                      "isOptional": true,
                      "description": "Loki ingest URL",
                      "defaultValue": ""
                    },
                    "RAILWAY_API_KEY": {
                      "isOptional": false,
                      "description": "Railway API key",
                      "defaultValue": "{{RAILWAY_API_KEY}}"
                    },
                    "ENABLE_HTTP_LOGS": {
                      "isOptional": true,
                      "description": "Whether to enable HTTP logs.",
                      "defaultValue": "false"
                    },
                    "LOGS_FILTER_LOKI": {
                      "isOptional": true,
                      "description": "Loki logs filter",
                      "defaultValue": "all"
                    },
                    "ADDITIONAL_HEADERS": {
                      "isOptional": true,
                      "description": "Additional headers for the ingest URL",
                      "defaultValue": ""
                    },
                    "ENABLE_DEPLOY_LOGS": {
                      "isOptional": true,
                      "description": "Whether to ship deploy logs",
                      "defaultValue": "true"
                    },
                    "DISCORD_WEBHOOK_URL": {
                      "isOptional": true,
                      "description": "Discord webhook URL",
                      "defaultValue": ""
                    },
                    "LOGS_FILTER_DISCORD": {
                      "isOptional": true,
                      "description": "Discord logs filter",
                      "defaultValue": "all"
                    },
                    "LOGS_FILTER_WEBHOOK": {
                      "isOptional": true,
                      "description": "Webhook log filters",
                      "defaultValue": "all"
                    },
                    "REPORT_STATUS_EVERY": {
                      "isOptional": true,
                      "description": "Reports the status of the locomotive every X seconds",
                      "defaultValue": "5s"
                    },
                    "MAX_ERR_ACCUMULATIONS": {
                      "isOptional": true,
                      "description": "The maximum number of errors to occur before exiting.",
                      "defaultValue": "10"
                    }
                  }
                },
                "e3a7b5be-210c-4a6d-8135-4a0a0da2c324": {
                  "icon": "https://www.vectorlogo.zone/logos/rabbitmq/rabbitmq-icon.svg",
                  "name": "RabbitMQ",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"CONFIG_PATH=/etc; SYSTEM_FILE=hosts; echo 127.0.0.1 rabbitmq >> ${CONFIG_PATH}/${SYSTEM_FILE} && echo management.tcp.ip = :: >> /etc/rabbitmq/conf.d/10-defaults.conf && docker-entrypoint.sh rabbitmq-server\"",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "rabbitmq:management"
                  },
                  "variables": {
                    "RABBITMQ_URL": {
                      "isOptional": false,
                      "description": "RabbitMQ URL",
                      "defaultValue": "amqp://${{RABBITMQ_DEFAULT_USER}}:${{RABBITMQ_DEFAULT_PASS}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "RABBITMQ_NODENAME": {
                      "isOptional": false,
                      "description": "Hostname for RabbitMQ (Don't change this).",
                      "defaultValue": "rabbit@rabbitmq"
                    },
                    "RABBITMQ_PRIVATE_URL": {
                      "isOptional": false,
                      "description": "RabbitMQ Private URL",
                      "defaultValue": "amqp://${{RABBITMQ_DEFAULT_USER}}:${{RABBITMQ_DEFAULT_PASS}}@${{RAILWAY_PRIVATE_DOMAIN}}:5672"
                    },
                    "RABBITMQ_DEFAULT_PASS": {
                      "isOptional": false,
                      "description": "RabbitMQ default password",
                      "defaultValue": "{{RABBITMQ_DEFAULT_PASS}}"
                    },
                    "RABBITMQ_DEFAULT_USER": {
                      "isOptional": false,
                      "description": "RabbitMQ Default User",
                      "defaultValue": "{{RABBITMQ_DEFAULT_USER}}"
                    }
                  },
                  "volumeMounts": {
                    "e3a7b5be-210c-4a6d-8135-4a0a0da2c324": {
                      "mountPath": "/var/lib/rabbitmq"
                    }
                  }
                },
                "fc377510-47dd-401d-9439-d59484d84e55": {
                  "icon": "https://www.vectorlogo.zone/logos/rabbitmq/rabbitmq-icon.svg",
                  "name": "RabbitMQ Web UI",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/brody192/railway-public-to-private-proxy"
                  },
                  "variables": {
                    "PROXY_HOST": {
                      "isOptional": false,
                      "defaultValue": "${{RabbitMQ.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PROXY_PORT": {
                      "isOptional": false,
                      "description": "RabbitMQ Management UI port",
                      "defaultValue": "15672"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 11,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T18:46:46.960Z",
  "generator_version": "0.1.0"
}
