{
  "manifest_version": "1.0.0",
  "template": {
    "id": "902f3476-80d5-4223-ac34-78fc9e5d3dd4",
    "slug": "trino",
    "name": "Trino",
    "description": "Distributed SQL query engine for databases, data lakes, and analytics.",
    "url": "https://railway.com/deploy/trino",
    "upstream": {
      "image": "trinodb/trino:483"
    }
  },
  "services": [
    {
      "name": "trino-worker-3",
      "source": {
        "image": "trinodb/trino:483"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "trino-coordinator",
      "source": {
        "image": "trinodb/trino:483"
      },
      "needs_volume": true,
      "volume_mount_path": "/etc/trino/catalog",
      "http": true
    },
    {
      "name": "trino-worker-2",
      "source": {
        "image": "trinodb/trino:483"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "trino-worker-1",
      "source": {
        "image": "trinodb/trino:483"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "trino-worker-3",
      "description": "Internal Trino HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRINO_NODE_ID",
      "service": "trino-worker-3",
      "description": "Unique worker identifier",
      "secret": false,
      "strategy": "default",
      "default": "worker-3"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "trino-worker-3",
      "description": "Allow generated configuration writes if required",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "TRINO_ENVIRONMENT",
      "service": "trino-worker-3",
      "description": "Same cluster environment",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "trino-coordinator",
      "description": "Trino HTTP and Web UI port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRINO_NODE_ID",
      "service": "trino-coordinator",
      "description": "Unique persistent node identifier",
      "secret": false,
      "strategy": "default",
      "default": "coordinator"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "trino-coordinator",
      "description": "Allow generated configuration and catalog volume writes",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "TRINO_ENVIRONMENT",
      "service": "trino-coordinator",
      "description": "Shared environment name across all cluster nodes",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "CATALOG_MANAGEMENT",
      "service": "trino-coordinator",
      "description": "Allow CREATE CATALOG and DROP CATALOG",
      "secret": false,
      "strategy": "default",
      "default": "dynamic"
    },
    {
      "key": "PORT",
      "service": "trino-worker-2",
      "description": "Internal Trino HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRINO_NODE_ID",
      "service": "trino-worker-2",
      "description": "Unique worker identifier",
      "secret": false,
      "strategy": "default",
      "default": "worker-2"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "trino-worker-2",
      "description": "Allow generated configuration writes if required",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "TRINO_ENVIRONMENT",
      "service": "trino-worker-2",
      "description": "Same cluster environment",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "trino-worker-1",
      "description": "Internal Trino HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRINO_NODE_ID",
      "service": "trino-worker-1",
      "description": "Unique persistent node identifier",
      "secret": false,
      "strategy": "default",
      "default": "worker-1"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "trino-worker-1",
      "description": "Allow generated configuration writes if required",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "TRINO_ENVIRONMENT",
      "service": "trino-worker-1",
      "description": "Same environment as coordinator",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "trino"
      }
    },
    "cli": "railway deploy --template trino",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "902f3476-80d5-4223-ac34-78fc9e5d3dd4",
            "serializedConfig": {
              "services": {
                "1e827165-9883-4cac-b446-90a4e51e1ce8": {
                  "icon": "https://www.gravatar.com/avatar/3d2bf4c90da61ec926b494b98fbb3851?s=120&r=g&d=404",
                  "name": "trino-worker-3",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'printf \"%s\\n\" \"coordinator=false\" \"http-server.http.port=8080\" \"discovery.uri=http://trino-coordinator.railway.internal:8080\" > /etc/trino/config.properties; printf \"%s\\n\" \"node.environment=${TRINO_ENVIRONMENT}\" \"node.id=${TRINO_NODE_ID}\" \"node.data-dir=/data/trino\" > /etc/trino/node.properties; exec /usr/lib/trino/bin/run-trino'"
                  },
                  "source": {
                    "image": "trinodb/trino:483"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Internal Trino HTTP port",
                      "defaultValue": "8080"
                    },
                    "TRINO_NODE_ID": {
                      "description": "Unique worker identifier",
                      "defaultValue": "worker-3"
                    },
                    "RAILWAY_RUN_UID": {
                      "description": "Allow generated configuration writes if required",
                      "defaultValue": "0"
                    },
                    "TRINO_ENVIRONMENT": {
                      "description": "Same cluster environment",
                      "defaultValue": "${{trino-coordinator.TRINO_ENVIRONMENT}}"
                    }
                  }
                },
                "356b48d7-9e54-4387-bb38-ad5b69902846": {
                  "icon": "https://www.gravatar.com/avatar/3d2bf4c90da61ec926b494b98fbb3851?s=120&r=g&d=404",
                  "name": "trino-coordinator",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'printf \"%s\\n\" \"coordinator=true\" \"node-scheduler.include-coordinator=false\" \"http-server.http.port=8080\" \"http-server.process-forwarded=true\" \"discovery.uri=http://trino-coordinator.railway.internal:8080\" \"catalog.management=dynamic\" > /etc/trino/config.properties; printf \"%s\\n\" \"node.environment=${TRINO_ENVIRONMENT}\" \"node.id=${TRINO_NODE_ID}\" \"node.data-dir=/data/trino\" > /etc/trino/node.properties; exec /usr/lib/trino/bin/run-trino'"
                  },
                  "source": {
                    "image": "trinodb/trino:483"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Trino HTTP and Web UI port",
                      "defaultValue": "8080"
                    },
                    "TRINO_NODE_ID": {
                      "description": "Unique persistent node identifier",
                      "defaultValue": "coordinator"
                    },
                    "RAILWAY_RUN_UID": {
                      "description": "Allow generated configuration and catalog volume writes",
                      "defaultValue": "0"
                    },
                    "TRINO_ENVIRONMENT": {
                      "description": "Shared environment name across all cluster nodes",
                      "defaultValue": "production"
                    },
                    "CATALOG_MANAGEMENT": {
                      "description": "Allow CREATE CATALOG and DROP CATALOG",
                      "defaultValue": "dynamic"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "356b48d7-9e54-4387-bb38-ad5b69902846": {
                      "mountPath": "/etc/trino/catalog"
                    }
                  }
                },
                "4885ddc1-9f70-4fa4-a42f-3320540ca84f": {
                  "icon": "https://www.gravatar.com/avatar/3d2bf4c90da61ec926b494b98fbb3851?s=120&r=g&d=404",
                  "name": "trino-worker-2",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'printf \"%s\\n\" \"coordinator=false\" \"http-server.http.port=8080\" \"discovery.uri=http://trino-coordinator.railway.internal:8080\" > /etc/trino/config.properties; printf \"%s\\n\" \"node.environment=${TRINO_ENVIRONMENT}\" \"node.id=${TRINO_NODE_ID}\" \"node.data-dir=/data/trino\" > /etc/trino/node.properties; exec /usr/lib/trino/bin/run-trino'"
                  },
                  "source": {
                    "image": "trinodb/trino:483"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Internal Trino HTTP port",
                      "defaultValue": "8080"
                    },
                    "TRINO_NODE_ID": {
                      "description": "Unique worker identifier",
                      "defaultValue": "worker-2"
                    },
                    "RAILWAY_RUN_UID": {
                      "description": "Allow generated configuration writes if required",
                      "defaultValue": "0"
                    },
                    "TRINO_ENVIRONMENT": {
                      "description": "Same cluster environment",
                      "defaultValue": "${{trino-coordinator.TRINO_ENVIRONMENT}}"
                    }
                  }
                },
                "7692f5ea-1a8f-4c2d-9993-0dae46fc1967": {
                  "icon": "https://www.gravatar.com/avatar/3d2bf4c90da61ec926b494b98fbb3851?s=120&r=g&d=404",
                  "name": "trino-worker-1",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'printf \"%s\\n\" \"coordinator=false\" \"http-server.http.port=8080\" \"discovery.uri=http://trino-coordinator.railway.internal:8080\" > /etc/trino/config.properties; printf \"%s\\n\" \"node.environment=${TRINO_ENVIRONMENT}\" \"node.id=${TRINO_NODE_ID}\" \"node.data-dir=/data/trino\" > /etc/trino/node.properties; exec /usr/lib/trino/bin/run-trino'"
                  },
                  "source": {
                    "image": "trinodb/trino:483"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Internal Trino HTTP port",
                      "defaultValue": "8080"
                    },
                    "TRINO_NODE_ID": {
                      "description": "Unique persistent node identifier",
                      "defaultValue": "worker-1"
                    },
                    "RAILWAY_RUN_UID": {
                      "description": "Allow generated configuration writes if required",
                      "defaultValue": "0"
                    },
                    "TRINO_ENVIRONMENT": {
                      "description": "Same environment as coordinator",
                      "defaultValue": "${{trino-coordinator.TRINO_ENVIRONMENT}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T13:02:22.270Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_745010de1dd94d659ccf",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 89,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "trino-worker-2"
  }
}
