{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c0e2d19e-7b26-4689-b945-7fd78b567237",
    "slug": "trivy-server",
    "name": "Trivy Server",
    "description": "Shared Trivy vulnerability database for CI, so clients skip the download",
    "url": "https://railway.com/deploy/trivy-server",
    "upstream": {
      "repo_url": "https://github.com/RockinPaul/trivy_railway_template"
    }
  },
  "services": [
    {
      "name": "trivy",
      "source": {
        "repo": "https://github.com/RockinPaul/trivy_railway_template"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "trivy",
      "description": "The port Railway's healthcheck probes and the public domain targets. Leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRIVY_TOKEN",
      "service": "trivy",
      "description": "The only access control on this endpoint. Clients send it as the Trivy-Token header, or set TRIVY_TOKEN in their environment. The server refuses to start without it.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "trivy-server"
      }
    },
    "cli": "railway deploy --template trivy-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c0e2d19e-7b26-4689-b945-7fd78b567237",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4391d297-219b-43ba-9513-21e5203614fd": {
                  "icon": null,
                  "name": "trivy",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/RockinPaul/trivy_railway_template",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "The port Railway's healthcheck probes and the public domain targets. Leave as is.",
                      "defaultValue": "8080"
                    },
                    "TRIVY_TOKEN": {
                      "isOptional": false,
                      "description": "The only access control on this endpoint. Clients send it as the Trivy-Token header, or set TRIVY_TOKEN in their environment. The server refuses to start without it.",
                      "defaultValue": "{{TRIVY_TOKEN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "4391d297-219b-43ba-9513-21e5203614fd": {
                      "sizeMB": 5120,
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "trivy",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-16T16:14:44.185Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-16T11:17:16.298Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_76e598f8fd1146f9be70",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 58,
    "typical_build_seconds": 30,
    "typical_start_seconds": 10,
    "slowest_service": "trivy"
  }
}
