{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e18a6109-c4b4-49fa-b485-468296a9e8c7",
    "slug": "endearing-contentment",
    "name": "Trivy",
    "description": "Open-source vulnerability scanner for container images and filesystems.",
    "url": "https://railway.com/deploy/endearing-contentment",
    "upstream": {
      "image": "aquasec/trivy:latest"
    }
  },
  "services": [
    {
      "name": "trivy",
      "source": {
        "image": "aquasec/trivy:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/cache/trivy",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "trivy",
      "description": "Server listen port. Railway maps this to the public domain.",
      "secret": false,
      "strategy": "default",
      "default": "4954"
    },
    {
      "key": "TRIVY_LISTEN",
      "service": "trivy",
      "description": "Bind address for the Trivy server. Must match PORT.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:4954"
    },
    {
      "key": "TRIVY_SCANNERS",
      "service": "trivy",
      "description": "Enabled scanner types. Comma-separated: vuln, misconfig, secret, license.",
      "secret": false,
      "strategy": "default",
      "default": "vuln,misconfig,secret,license"
    },
    {
      "key": "TRIVY_CACHE_BACKEND",
      "service": "trivy",
      "description": "Cache backend for the vulnerability database. 'fs' stores locally. Use 'redis://redis:6379' with a Redis companion for shared cache.",
      "secret": false,
      "strategy": "default",
      "default": "fs"
    },
    {
      "key": "TRIVY_DB_REPOSITORY",
      "service": "trivy",
      "description": "OCI repository to pull the vulnerability database from.",
      "secret": false,
      "strategy": "default",
      "default": "mirror.gcr.io/aquasec/trivy-db:2"
    },
    {
      "key": "TRIVY_SKIP_DB_UPDATE",
      "service": "trivy",
      "description": "Skip automatic vulnerability database updates on startup. Not recommended.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "endearing-contentment"
      }
    },
    "cli": "railway deploy --template endearing-contentment",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e18a6109-c4b4-49fa-b485-468296a9e8c7",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2e63e5b3-8837-48ab-b521-17e987337ea1": {
                  "icon": null,
                  "name": "trivy",
                  "deploy": {
                    "startCommand": "trivy server --listen 0.0.0.0:4954",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "aquasec/trivy:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Server listen port. Railway maps this to the public domain.",
                      "defaultValue": "4954"
                    },
                    "TRIVY_LISTEN": {
                      "isOptional": false,
                      "description": "Bind address for the Trivy server. Must match PORT.",
                      "defaultValue": "0.0.0.0:4954"
                    },
                    "TRIVY_SCANNERS": {
                      "isOptional": false,
                      "description": "Enabled scanner types. Comma-separated: vuln, misconfig, secret, license.",
                      "defaultValue": "vuln,misconfig,secret,license"
                    },
                    "TRIVY_CACHE_BACKEND": {
                      "isOptional": false,
                      "description": "Cache backend for the vulnerability database. 'fs' stores locally. Use 'redis://redis:6379' with a Redis companion for shared cache.",
                      "defaultValue": "fs"
                    },
                    "TRIVY_DB_REPOSITORY": {
                      "isOptional": false,
                      "description": "OCI repository to pull the vulnerability database from.",
                      "defaultValue": "mirror.gcr.io/aquasec/trivy-db:2"
                    },
                    "TRIVY_SKIP_DB_UPDATE": {
                      "isOptional": false,
                      "description": "Skip automatic vulnerability database updates on startup. Not recommended.",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:4954": {
                        "port": 4954
                      }
                    }
                  },
                  "volumeMounts": {
                    "2e63e5b3-8837-48ab-b521-17e987337ea1": {
                      "mountPath": "/var/cache/trivy"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-17T04:14:44.001Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T02:34:32.757Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c00a8e594e34490fa325",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 17,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "trivy"
  }
}
