{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b233e39c-d7d2-4a8f-b288-b7ae8b8f4b70",
    "slug": "starrocks",
    "name": "StarRocks",
    "description": "Analyze data fast with real-time OLAP and MySQL-compatible SQL.",
    "url": "https://railway.com/deploy/starrocks",
    "upstream": {
      "image": "starrocks/allin1-ubuntu:4.1.4"
    }
  },
  "services": [
    {
      "name": "starrocks",
      "source": {
        "image": "starrocks/allin1-ubuntu:4.1.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/persist",
      "tcp_ports": [
        9030
      ],
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "starrocks",
      "description": "Railway HTTP target port for StarRocks FE HTTP/API",
      "secret": false,
      "strategy": "default",
      "default": "8030"
    },
    {
      "key": "RUN_MODE",
      "service": "starrocks",
      "description": "Use local BE storage in shared-nothing mode",
      "secret": false,
      "strategy": "default",
      "default": "shared_nothing"
    },
    {
      "key": "QUERY_PORT",
      "service": "starrocks",
      "description": "MySQL-compatible SQL query port",
      "secret": false,
      "strategy": "default",
      "default": "9030"
    },
    {
      "key": "STARROCKS_FE_HEAP",
      "service": "starrocks",
      "description": "Maximum JVM heap allocated to the FE service",
      "secret": false,
      "strategy": "default",
      "default": "1024m"
    },
    {
      "key": "STARROCKS_META_DIR",
      "service": "starrocks",
      "description": "Persistent FE metadata directory",
      "secret": false,
      "strategy": "default",
      "default": "/data/persist/fe-meta"
    },
    {
      "key": "STARROCKS_STORAGE_ROOT",
      "service": "starrocks",
      "description": "Persistent BE analytical data directory",
      "secret": false,
      "strategy": "default",
      "default": "/data/persist/be-storage"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "starrocks"
      }
    },
    "cli": "railway deploy --template starrocks",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b233e39c-d7d2-4a8f-b288-b7ae8b8f4b70",
            "serializedConfig": {
              "services": {
                "139aed2f-b426-4bca-8c74-1385b404fa74": {
                  "icon": "https://www.gravatar.com/avatar/26712e45547dddc52f8c9671fe6e75b8?s=80&r=g&d=mm",
                  "name": "starrocks",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'mkdir -p \"$STARROCKS_META_DIR\" \"$STARROCKS_STORAGE_ROOT\"; sed -i \"/^[[:space:]]*meta_dir[[:space:]]*=/d\" /data/deploy/starrocks/fe/conf/fe.conf; sed -i \"/^[[:space:]]*storage_root_path[[:space:]]*=/d\" /data/deploy/starrocks/be/conf/be.conf; sed -i \"/^[[:space:]]*JAVA_OPTS[[:space:]]*=/d\" /data/deploy/starrocks/fe/conf/fe.conf; printf \"\\nmeta_dir = %s\\nJAVA_OPTS=\\\"-Dlog4j2.formatMsgNoLookups=true -Xmx%s -XX:+UseG1GC -Djava.security.policy=/data/deploy/starrocks/fe/conf/udf_security.policy\\\"\\n\" \"$STARROCKS_META_DIR\" \"$STARROCKS_FE_HEAP\" >> /data/deploy/starrocks/fe/conf/fe.conf; printf \"\\nstorage_root_path = %s\\n\" \"$STARROCKS_STORAGE_ROOT\" >> /data/deploy/starrocks/be/conf/be.conf; exec /data/deploy/entrypoint.sh'"
                  },
                  "source": {
                    "image": "starrocks/allin1-ubuntu:4.1.4"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Railway HTTP target port for StarRocks FE HTTP/API",
                      "defaultValue": "8030"
                    },
                    "RUN_MODE": {
                      "description": "Use local BE storage in shared-nothing mode",
                      "defaultValue": "shared_nothing"
                    },
                    "QUERY_PORT": {
                      "description": "MySQL-compatible SQL query port",
                      "defaultValue": "9030"
                    },
                    "STARROCKS_FE_HEAP": {
                      "description": "Maximum JVM heap allocated to the FE service",
                      "defaultValue": "1024m"
                    },
                    "STARROCKS_META_DIR": {
                      "description": "Persistent FE metadata directory",
                      "defaultValue": "/data/persist/fe-meta"
                    },
                    "STARROCKS_STORAGE_ROOT": {
                      "description": "Persistent BE analytical data directory",
                      "defaultValue": "/data/persist/be-storage"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "9030": {}
                    },
                    "serviceDomains": {
                      "<hasDomain>:8030": {
                        "port": 8030
                      }
                    }
                  },
                  "volumeMounts": {
                    "139aed2f-b426-4bca-8c74-1385b404fa74": {
                      "mountPath": "/data/persist"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T22:14:37.505Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T12:28:50.843Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_92d9e08ae10741c188c9",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 78,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "starrocks"
  }
}
