{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1c487ec7-37cd-4026-8c83-7d361ad46e5a",
    "slug": "ragflow",
    "name": "RAGFlow",
    "description": "RAG engine with document parsing, citations, and agentic workflows",
    "url": "https://railway.com/deploy/ragflow",
    "upstream": {
      "repo_url": "https://github.com/atoolz/railway-ragflow"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "RAGFlow",
      "source": {
        "repo": "https://github.com/atoolz/railway-ragflow"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "MinIO",
      "source": {
        "image": "quay.io/minio/minio:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Elasticsearch",
      "source": {
        "image": "elasticsearch:8.11.3"
      },
      "needs_volume": true,
      "volume_mount_path": "/usr/share/elasticsearch/data",
      "http": false
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Internal hostname (auto-set by Railway)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redis port (auto-set by Railway)",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis user (auto-set by Railway)",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Internal connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Password alias",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password (auto-generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "External connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TZ",
      "service": "RAGFlow",
      "description": "Timezone for the container",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "RAGFlow",
      "description": "Port Railway routes traffic to (nginx)",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "DEVICE",
      "service": "RAGFlow",
      "description": "Inference device (cpu or gpu)",
      "secret": false,
      "strategy": "default",
      "default": "cpu"
    },
    {
      "key": "ES_HOST",
      "service": "RAGFlow",
      "description": "Elasticsearch internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DOC_ENGINE",
      "service": "RAGFlow",
      "description": "Vector DB engine (elasticsearch, opensearch, infinity)",
      "secret": false,
      "strategy": "default",
      "default": "elasticsearch"
    },
    {
      "key": "MINIO_HOST",
      "service": "RAGFlow",
      "description": "MinIO internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MINIO_PORT",
      "service": "RAGFlow",
      "description": "MinIO API port",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "MINIO_USER",
      "service": "RAGFlow",
      "description": "MinIO access key",
      "secret": false,
      "strategy": "default",
      "default": "rag_flow"
    },
    {
      "key": "MYSQL_HOST",
      "service": "RAGFlow",
      "description": "MySQL internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_PORT",
      "service": "RAGFlow",
      "description": "MySQL connection port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQL_USER",
      "service": "RAGFlow",
      "description": "MySQL user",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "REDIS_HOST",
      "service": "RAGFlow",
      "description": "Redis internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PORT",
      "service": "RAGFlow",
      "description": "Redis connection port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "MYSQL_DBNAME",
      "service": "RAGFlow",
      "description": "RAGFlow database name",
      "secret": false,
      "strategy": "default",
      "default": "rag_flow"
    },
    {
      "key": "MINIO_PASSWORD",
      "service": "RAGFlow",
      "description": "MinIO secret key (from MinIO service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "RAGFlow",
      "description": "MySQL password (from native DB)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "RAGFlow",
      "description": "Redis password (from native DB)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_USERNAME",
      "service": "RAGFlow",
      "description": "Redis username (Railway native uses \"default\")",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "API_PROXY_SCHEME",
      "service": "RAGFlow",
      "description": "Backend mode (python, go, hybrid)",
      "secret": false,
      "strategy": "default",
      "default": "python"
    },
    {
      "key": "ELASTIC_PASSWORD",
      "service": "RAGFlow",
      "description": "Elasticsearch password (from ES service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_MAX_PACKET",
      "service": "RAGFlow",
      "description": "Max packet size (1GB) for large document imports",
      "secret": false,
      "strategy": "default",
      "default": "1073741824"
    },
    {
      "key": "REGISTER_ENABLED",
      "service": "RAGFlow",
      "description": "Allow user registration (1=on, 0=off)",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PORT",
      "service": "MinIO",
      "description": "MinIO API port",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "MINIO_ROOT_USER",
      "service": "MinIO",
      "description": "MinIO access key / admin username",
      "secret": false,
      "strategy": "default",
      "default": "rag_flow"
    },
    {
      "key": "MINIO_ROOT_PASSWORD",
      "service": "MinIO",
      "description": "MinIO secret key / admin password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ES_JAVA_OPTS",
      "service": "Elasticsearch",
      "description": "JVM heap size (adjust based on plan)",
      "secret": false,
      "strategy": "default",
      "default": "-Xms1g -Xmx1g"
    },
    {
      "key": "discovery.type",
      "service": "Elasticsearch",
      "description": "Single node mode (no cluster)",
      "secret": false,
      "strategy": "default",
      "default": "single-node"
    },
    {
      "key": "ELASTIC_PASSWORD",
      "service": "Elasticsearch",
      "description": "Password for elastic user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "bootstrap.memory_lock",
      "service": "Elasticsearch",
      "description": "Disable memory lock (Railway manages memory)",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "xpack.security.enabled",
      "service": "Elasticsearch",
      "description": "Enable authentication",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "xpack.security.http.ssl.enabled",
      "service": "Elasticsearch",
      "description": "Disable HTTPS (internal network)",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "xpack.security.transport.ssl.enabled",
      "service": "Elasticsearch",
      "description": "Disable transport SSL (single node)",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Internal hostname (auto-set by Railway)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL port (auto-set by Railway)",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "MySQL user (auto-set by Railway)",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Internal connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Database name alias",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Password alias",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database name for RAGFlow",
      "secret": false,
      "strategy": "default",
      "default": "rag_flow"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "External connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password (auto-generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ragflow"
      }
    },
    "cli": "railway deploy --template ragflow",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1c487ec7-37cd-4026-8c83-7d361ad46e5a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "289e54e0-efb6-4385-a84f-4c90245e9876": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal hostname (auto-set by Railway)",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis port (auto-set by Railway)",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis user (auto-set by Railway)",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal connection URL",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password alias",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (auto-generated)",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External connection URL",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "289e54e0-efb6-4385-a84f-4c90245e9876": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "4f61e9db-08cb-450e-b480-49f2e90e629a": {
                  "icon": "https://raw.githubusercontent.com/atoolz/railway-ragflow/main/assets/icon.svg",
                  "name": "RAGFlow",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/v1/system/config",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/atoolz/railway-ragflow",
                    "rootDirectory": "ragflow"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Timezone for the container",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes traffic to (nginx)",
                      "defaultValue": "80"
                    },
                    "DEVICE": {
                      "isOptional": false,
                      "description": "Inference device (cpu or gpu)",
                      "defaultValue": "cpu"
                    },
                    "ES_HOST": {
                      "isOptional": false,
                      "description": "Elasticsearch internal hostname",
                      "defaultValue": "${{Elasticsearch.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DOC_ENGINE": {
                      "isOptional": false,
                      "description": "Vector DB engine (elasticsearch, opensearch, infinity)",
                      "defaultValue": "elasticsearch"
                    },
                    "MINIO_HOST": {
                      "isOptional": false,
                      "description": "MinIO internal hostname",
                      "defaultValue": "${{MinIO.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MINIO_PORT": {
                      "isOptional": false,
                      "description": "MinIO API port",
                      "defaultValue": "9000"
                    },
                    "MINIO_USER": {
                      "isOptional": false,
                      "description": "MinIO access key",
                      "defaultValue": "rag_flow"
                    },
                    "MYSQL_HOST": {
                      "isOptional": false,
                      "description": "MySQL internal hostname",
                      "defaultValue": "${{MySQL.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQL_PORT": {
                      "isOptional": false,
                      "description": "MySQL connection port",
                      "defaultValue": "3306"
                    },
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "MySQL user",
                      "defaultValue": "root"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis internal hostname",
                      "defaultValue": "${{Redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis connection port",
                      "defaultValue": "6379"
                    },
                    "MYSQL_DBNAME": {
                      "isOptional": false,
                      "description": "RAGFlow database name",
                      "defaultValue": "rag_flow"
                    },
                    "MINIO_PASSWORD": {
                      "isOptional": false,
                      "description": "MinIO secret key (from MinIO service)",
                      "defaultValue": "${{MinIO.MINIO_ROOT_PASSWORD}}"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "MySQL password (from native DB)",
                      "defaultValue": "${{MySQL.MYSQL_ROOT_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (from native DB)",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "REDIS_USERNAME": {
                      "isOptional": false,
                      "description": "Redis username (Railway native uses \"default\")",
                      "defaultValue": "default"
                    },
                    "API_PROXY_SCHEME": {
                      "isOptional": false,
                      "description": "Backend mode (python, go, hybrid)",
                      "defaultValue": "python"
                    },
                    "ELASTIC_PASSWORD": {
                      "isOptional": false,
                      "description": "Elasticsearch password (from ES service)",
                      "defaultValue": "${{Elasticsearch.ELASTIC_PASSWORD}}"
                    },
                    "MYSQL_MAX_PACKET": {
                      "isOptional": false,
                      "description": "Max packet size (1GB) for large document imports",
                      "defaultValue": "1073741824"
                    },
                    "REGISTER_ENABLED": {
                      "isOptional": false,
                      "description": "Allow user registration (1=on, 0=off)",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  }
                },
                "86d08fe6-bc33-42ce-8745-5d7f658a5c17": {
                  "icon": "https://raw.githubusercontent.com/atoolz/railway-ragflow/main/assets/icon-minio.svg",
                  "name": "MinIO",
                  "deploy": {
                    "startCommand": "minio server /data --console-address :9001",
                    "healthcheckPath": "/minio/health/live",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "quay.io/minio/minio:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "MinIO API port",
                      "defaultValue": "9000"
                    },
                    "MINIO_ROOT_USER": {
                      "isOptional": false,
                      "description": "MinIO access key / admin username",
                      "defaultValue": "rag_flow"
                    },
                    "MINIO_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "MinIO secret key / admin password",
                      "defaultValue": "{{MINIO_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "86d08fe6-bc33-42ce-8745-5d7f658a5c17": {
                      "mountPath": "/data"
                    }
                  }
                },
                "88dac11d-a410-4132-a696-a7d52485c64a": {
                  "icon": "https://raw.githubusercontent.com/atoolz/railway-ragflow/main/assets/icon-elasticsearch.svg",
                  "name": "Elasticsearch",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "elasticsearch:8.11.3"
                  },
                  "variables": {
                    "ES_JAVA_OPTS": {
                      "isOptional": false,
                      "description": "JVM heap size (adjust based on plan)",
                      "defaultValue": "-Xms1g -Xmx1g"
                    },
                    "discovery.type": {
                      "isOptional": false,
                      "description": "Single node mode (no cluster)",
                      "defaultValue": "single-node"
                    },
                    "ELASTIC_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for elastic user",
                      "defaultValue": "{{ELASTIC_PASSWORD}}"
                    },
                    "bootstrap.memory_lock": {
                      "isOptional": false,
                      "description": "Disable memory lock (Railway manages memory)",
                      "defaultValue": "false"
                    },
                    "xpack.security.enabled": {
                      "isOptional": false,
                      "description": "Enable authentication",
                      "defaultValue": "true"
                    },
                    "xpack.security.http.ssl.enabled": {
                      "isOptional": false,
                      "description": "Disable HTTPS (internal network)",
                      "defaultValue": "false"
                    },
                    "xpack.security.transport.ssl.enabled": {
                      "isOptional": false,
                      "description": "Disable transport SSL (single node)",
                      "defaultValue": "false"
                    }
                  },
                  "volumeMounts": {
                    "88dac11d-a410-4132-a696-a7d52485c64a": {
                      "mountPath": "/usr/share/elasticsearch/data"
                    }
                  }
                },
                "d79e53db-06e4-495e-be1b-fc129c63acb7": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Internal hostname (auto-set by Railway)",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL port (auto-set by Railway)",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "MySQL user (auto-set by Railway)",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Internal connection URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Database name alias",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Password alias",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database name for RAGFlow",
                      "defaultValue": "rag_flow"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External connection URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password (auto-generated)",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "d79e53db-06e4-495e-be1b-fc129c63acb7": {
                      "mountPath": "/var/lib/mysql"
                    }
                  },
                  "haTemplateCode": "mysql-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "MySQL Replicas",
                      "options": [
                        2,
                        4,
                        6,
                        8
                      ],
                      "nodeLabel": "MySQL",
                      "description": "Requires odd count for quorum",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your MySQL instance to an HA cluster with Group Replication failover and HAProxy routing to the primary.",
                    "supportedImageMajorVersions": [
                      8,
                      9
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "RAGFlow",
      "method": "GET",
      "path": "/v1/system/config",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-18T08:11:24.955Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_feb50f608a52486fbd9e",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "QUEUED,SUCCESS,SUCCESS,SUCCESS,FAILED"
      }
    ]
  }
}
