{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f72eea79-a413-4983-aa94-250fba4cb964",
    "slug": "opencode-cli-web-app",
    "name": "OpenCode CLI + Web App",
    "description": "OpenCode web UI on a public URL + SSH TUI, all in one Railway box",
    "url": "https://railway.com/deploy/opencode-cli-web-app",
    "upstream": {
      "image": "ghcr.io/yuting1214/opencode-railway:1.0"
    }
  },
  "services": [
    {
      "name": "OpenCode",
      "source": {
        "image": "ghcr.io/yuting1214/opencode-railway:1.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/workspace",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "OPENCODE_SERVER_PASSWORD",
      "service": "OpenCode",
      "description": "Password for the web UI sign-in. A strong one is generated for you — copy it from this service's Variables tab after deploying.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "OPENCODE_SERVER_USERNAME",
      "service": "OpenCode",
      "description": "Username for the web UI sign-in. The default works — change it only if you want a different login name.",
      "secret": false,
      "strategy": "default",
      "default": "opencode"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "opencode-cli-web-app"
      }
    },
    "cli": "railway deploy --template opencode-cli-web-app",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f72eea79-a413-4983-aa94-250fba4cb964",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "a3a8a882-ed33-43ba-b48e-f3aca377413c": {
                  "name": "OpenCode",
                  "deploy": {
                    "healthcheckPath": "/site.webmanifest",
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ghcr.io/yuting1214/opencode-railway:1.0"
                  },
                  "variables": {
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "GPT models. Set any one provider key here, or leave all blank and run `opencode auth login` inside the box.",
                      "defaultValue": ""
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Claude models. Set any one provider key here, or leave all blank and run `opencode auth login` inside the box.",
                      "defaultValue": ""
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Many providers behind a single key. Set any one provider key here, or leave all blank and run `opencode auth login` inside the box.",
                      "defaultValue": ""
                    },
                    "OPENCODE_SERVER_PASSWORD": {
                      "description": "Password for the web UI sign-in. A strong one is generated for you — copy it from this service's Variables tab after deploying.",
                      "defaultValue": "{{OPENCODE_SERVER_PASSWORD}}"
                    },
                    "OPENCODE_SERVER_USERNAME": {
                      "description": "Username for the web UI sign-in. The default works — change it only if you want a different login name.",
                      "defaultValue": "opencode"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "a3a8a882-ed33-43ba-b48e-f3aca377413c": {
                      "mountPath": "/workspace"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "OpenCode",
      "method": "GET",
      "path": "/site.webmanifest",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T08:29:27.735Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f581bbda217b4805afbd",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 124,
    "typical_build_seconds": 0,
    "typical_start_seconds": 15,
    "slowest_service": "OpenCode"
  }
}
