{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9f83d770-b79a-4944-8c84-490e4da9fd7e",
    "slug": "pyroscope",
    "name": "Pyroscope",
    "description": "Pyroscope 2.3 continuous profiling with volume storage and auth gateway.",
    "url": "https://railway.com/deploy/pyroscope",
    "upstream": {
      "image": "caddy:2.11.4-alpine"
    }
  },
  "services": [
    {
      "name": "gateway",
      "source": {
        "image": "caddy:2.11.4-alpine"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "pyroscope",
      "source": {
        "image": "grafana/pyroscope:2.3.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "CADDYFILE",
      "service": "gateway",
      "description": "Provide a value for CADDYFILE.",
      "secret": false,
      "strategy": "default",
      "default": "{\n\tadmin off\n\tauto_https off\n}\n\n:{$PORT} {\n\thandle /healthz {\n\t\trespond ok 200\n\t}\n\n\t@ingest path /ingest /push.v1.PusherService/*\n\thandle @ingest {\n\t\tbasic_auth {\n\t\t\t{$PYROSCOPE_INGEST_USERNAME} {$PYROSCOPE_INGEST_PASSWORD_HASH}\n\t\t}\n\t\treverse_proxy {$PYROSCOPE_UPSTREAM}\n\t}\n\n\thandle {\n\t\tbasic_auth {\n\t\t\t{$PYROSCOPE_UI_USERNAME} {$PYROSCOPE_UI_PASSWORD_HASH}\n\t\t}\n\t\treverse_proxy {$PYROSCOPE_UPSTREAM}\n\t}\n}"
    },
    {
      "key": "PYROSCOPE_UPSTREAM",
      "service": "gateway",
      "description": "Provide a value for PYROSCOPE_UPSTREAM.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PYROSCOPE_PUBLIC_URL",
      "service": "gateway",
      "description": "Provide a value for PYROSCOPE_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PYROSCOPE_UI_PASSWORD",
      "service": "gateway",
      "description": "Provide a value for PYROSCOPE_UI_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PYROSCOPE_UI_USERNAME",
      "service": "gateway",
      "description": "Provide a value for PYROSCOPE_UI_USERNAME.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "PYROSCOPE_INGEST_PASSWORD",
      "service": "gateway",
      "description": "Provide a value for PYROSCOPE_INGEST_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PYROSCOPE_INGEST_USERNAME",
      "service": "gateway",
      "description": "Provide a value for PYROSCOPE_INGEST_USERNAME.",
      "secret": false,
      "strategy": "default",
      "default": "ingest"
    },
    {
      "key": "PORT",
      "service": "pyroscope",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "4040"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "pyroscope",
      "description": "Provide a value for RAILWAY_RUN_UID.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "PYROSCOPE_PRIVATE_URL",
      "service": "pyroscope",
      "description": "Provide a value for PYROSCOPE_PRIVATE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "pyroscope",
      "description": "Provide a value for RAILWAY_DEPLOYMENT_DRAINING_SECONDS.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pyroscope"
      }
    },
    "cli": "railway deploy --template pyroscope",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9f83d770-b79a-4944-8c84-490e4da9fd7e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "517589d6-84bb-442c-8e4e-7860567535fb": {
                  "icon": "https://raw.githubusercontent.com/caddyserver/website/5c921006aae4feb2184782ae528c2bb09a07e04f/src/resources/images/favicon.png",
                  "name": "gateway",
                  "deploy": {
                    "startCommand": "sh -c 'export PYROSCOPE_UI_PASSWORD_HASH=\"$(caddy hash-password --plaintext \"$PYROSCOPE_UI_PASSWORD\")\" PYROSCOPE_INGEST_PASSWORD_HASH=\"$(caddy hash-password --plaintext \"$PYROSCOPE_INGEST_PASSWORD\")\" && printf \"%s\\n\" \"$CADDYFILE\" > /tmp/Caddyfile && exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.4-alpine"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "defaultValue": "8080"
                    },
                    "CADDYFILE": {
                      "isOptional": false,
                      "defaultValue": "{\n\tadmin off\n\tauto_https off\n}\n\n:{$PORT} {\n\thandle /healthz {\n\t\trespond ok 200\n\t}\n\n\t@ingest path /ingest /push.v1.PusherService/*\n\thandle @ingest {\n\t\tbasic_auth {\n\t\t\t{$PYROSCOPE_INGEST_USERNAME} {$PYROSCOPE_INGEST_PASSWORD_HASH}\n\t\t}\n\t\treverse_proxy {$PYROSCOPE_UPSTREAM}\n\t}\n\n\thandle {\n\t\tbasic_auth {\n\t\t\t{$PYROSCOPE_UI_USERNAME} {$PYROSCOPE_UI_PASSWORD_HASH}\n\t\t}\n\t\treverse_proxy {$PYROSCOPE_UPSTREAM}\n\t}\n}"
                    },
                    "PYROSCOPE_UPSTREAM": {
                      "isOptional": false,
                      "defaultValue": "${{pyroscope.RAILWAY_PRIVATE_DOMAIN}}:4040"
                    },
                    "PYROSCOPE_PUBLIC_URL": {
                      "isOptional": false,
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PYROSCOPE_UI_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{PYROSCOPE_UI_PASSWORD}}"
                    },
                    "PYROSCOPE_UI_USERNAME": {
                      "isOptional": false,
                      "defaultValue": "admin"
                    },
                    "PYROSCOPE_INGEST_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{PYROSCOPE_INGEST_PASSWORD}}"
                    },
                    "PYROSCOPE_INGEST_USERNAME": {
                      "isOptional": false,
                      "defaultValue": "ingest"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "c7d3e31e-8b66-4961-919d-699b901db6fc": {
                  "icon": "https://raw.githubusercontent.com/grafana/pyroscope/v2.3.1/ui/public/favicon.svg",
                  "name": "pyroscope",
                  "deploy": {
                    "startCommand": "/usr/bin/pyroscope -config.file=/etc/pyroscope/config.yaml -architecture.storage=v2 -retention-period=14d -self-profiling.disable-push=true",
                    "healthcheckPath": "/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "grafana/pyroscope:2.3.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "defaultValue": "4040"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "defaultValue": "0"
                    },
                    "PYROSCOPE_PRIVATE_URL": {
                      "isOptional": false,
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:4040"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "c7d3e31e-8b66-4961-919d-699b901db6fc": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-23T22:14:45.316Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-23T22:01:18.695Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1ee380f2cf82416b8054",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 89,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "gateway"
  }
}
