{
  "manifest_version": "1.0.0",
  "template": {
    "id": "937d61f0-456d-41e2-802d-a05fd60c11f8",
    "slug": "centrifugo-for-moodle",
    "name": "Centrifugo for Moodle",
    "description": "Web sockets support in Moodle (tool_realtime)",
    "url": "https://railway.com/deploy/centrifugo-for-moodle",
    "upstream": {
      "image": "centrifugo/centrifugo:v6"
    }
  },
  "services": [
    {
      "name": "centrifugo",
      "source": {
        "image": "centrifugo/centrifugo:v6"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "centrifugo",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "_EXPORT_TO_MOODLE",
      "service": "centrifugo",
      "description": "Provide a value for _EXPORT_TO_MOODLE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CENTRIFUGO_ADMIN_SECRET",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_ADMIN_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CENTRIFUGO_HTTP_API_KEY",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_HTTP_API_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CENTRIFUGO_ADMIN_ENABLED",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_ADMIN_ENABLED.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CENTRIFUGO_ADMIN_PASSWORD",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_ADMIN_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CENTRIFUGO_HEALTH_ENABLED",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_HEALTH_ENABLED.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CENTRIFUGO_HTTP_SERVER_PORT",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_HTTP_SERVER_PORT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CENTRIFUGO_CHANNEL_NAMESPACES",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_CHANNEL_NAMESPACES.",
      "secret": false,
      "strategy": "default",
      "default": "[{\"name\":\"anypush\",\"allow_subscribe_for_client\":true,\"allow_publish_for_client\":true},{\"name\":\"server\",\"allow_subscribe_for_client\":true,\"allow_publish_for_client\":false}]"
    },
    {
      "key": "CENTRIFUGO_CLIENT_ALLOWED_ORIGINS",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_CLIENT_ALLOWED_ORIGINS.",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOW_PUBLISH_FOR_CLIENT",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOW_PUBLISH_FOR_CLIENT.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOW_SUBSCRIBE_FOR_CLIENT",
      "service": "centrifugo",
      "description": "Provide a value for CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOW_SUBSCRIBE_FOR_CLIENT.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "centrifugo-for-moodle"
      }
    },
    "cli": "railway deploy --template centrifugo-for-moodle",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "937d61f0-456d-41e2-802d-a05fd60c11f8",
            "serializedConfig": {
              "services": {
                "714a4016-6e7d-4c69-a117-e5d9c0cc29f4": {
                  "icon": "https://devicons.railway.app/centrifugo",
                  "name": "centrifugo",
                  "deploy": {
                    "startCommand": "centrifugo",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE"
                  },
                  "source": {
                    "image": "centrifugo/centrifugo:v6",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 6,
                          "endHour": 24,
                          "startHour": 0
                        }
                      ]
                    }
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8000"
                    },
                    "_EXPORT_TO_MOODLE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{\"HOST\":\"${{RAILWAY_PUBLIC_DOMAIN}}\", \"CENTRIFUGO_HTTP_API_KEY\":\"${{centrifugo.CENTRIFUGO_HTTP_API_KEY}}\", \"CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY\":\"${{centrifugo.CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY}}\"}"
                    },
                    "CENTRIFUGO_ADMIN_SECRET": {
                      "description": "",
                      "defaultValue": "{{CENTRIFUGO_ADMIN_SECRET}}"
                    },
                    "CENTRIFUGO_HTTP_API_KEY": {
                      "description": "",
                      "defaultValue": "{{CENTRIFUGO_HTTP_API_KEY}}"
                    },
                    "CENTRIFUGO_ADMIN_ENABLED": {
                      "defaultValue": "true"
                    },
                    "CENTRIFUGO_ADMIN_PASSWORD": {
                      "description": "",
                      "defaultValue": "{{CENTRIFUGO_ADMIN_PASSWORD}}"
                    },
                    "CENTRIFUGO_HEALTH_ENABLED": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "CENTRIFUGO_HTTP_SERVER_PORT": {
                      "description": "",
                      "defaultValue": "${{centrifugo.PORT}}"
                    },
                    "CENTRIFUGO_CHANNEL_NAMESPACES": {
                      "defaultValue": "[{\"name\":\"anypush\",\"allow_subscribe_for_client\":true,\"allow_publish_for_client\":true},{\"name\":\"server\",\"allow_subscribe_for_client\":true,\"allow_publish_for_client\":false}]"
                    },
                    "CENTRIFUGO_CLIENT_ALLOWED_ORIGINS": {
                      "defaultValue": "*"
                    },
                    "CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY": {
                      "description": "",
                      "defaultValue": "{{CENTRIFUGO_CLIENT_TOKEN_HMAC_SECRET_KEY}}"
                    },
                    "CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOW_PUBLISH_FOR_CLIENT": {
                      "defaultValue": "false"
                    },
                    "CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOW_SUBSCRIBE_FOR_CLIENT": {
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8000": {
                        "port": 8000
                      }
                    }
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "centrifugo",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T11:51:10.928Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_dc4c362e5a1b4113bbbe",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 48,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "centrifugo"
  }
}
