{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fcb69e0e-a242-4710-acca-26d827e61124",
    "slug": "pinchflat-youtube-media",
    "name": "Pinchflat YouTube media",
    "description": "Authenticated YouTube media automation with persistent downloads.",
    "url": "https://railway.com/deploy/pinchflat-youtube-media",
    "upstream": {
      "image": "ghcr.io/kieraneglin/pinchflat:latest@sha256:01b4f98aabaf3f5fe394213f7a32578c9e84e42080f52e2f8334021a4473b202"
    }
  },
  "services": [
    {
      "name": "Pinchflat",
      "source": {
        "image": "ghcr.io/kieraneglin/pinchflat:latest@sha256:01b4f98aabaf3f5fe394213f7a32578c9e84e42080f52e2f8334021a4473b202"
      },
      "needs_volume": true,
      "volume_mount_path": "/config",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "Pinchflat",
      "description": "IANA timezone used for schedules.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "Pinchflat",
      "description": "Pinchflat HTTP listener used by Railway.",
      "secret": false,
      "strategy": "default",
      "default": "8945"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Pinchflat",
      "description": "Application log verbosity.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "MEDIA_PATH",
      "service": "Pinchflat",
      "description": "Downloaded media directory inside the persistent data volume.",
      "secret": false,
      "strategy": "default",
      "default": "/config/downloads"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Pinchflat",
      "description": "Generated secret for signed and encrypted browser state.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BASIC_AUTH_PASSWORD",
      "service": "Pinchflat",
      "description": "Generated password protecting the UI and management routes.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BASIC_AUTH_USERNAME",
      "service": "Pinchflat",
      "description": "Generated-credential login username.",
      "secret": false,
      "strategy": "default",
      "default": "pinchflat"
    },
    {
      "key": "YT_DLP_WORKER_CONCURRENCY",
      "service": "Pinchflat",
      "description": "One download worker per queue to bound starter resource use.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pinchflat-youtube-media"
      }
    },
    "cli": "railway deploy --template pinchflat-youtube-media",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fcb69e0e-a242-4710-acca-26d827e61124",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2530464a-2da4-444d-928e-d52952cf7e62": {
                  "icon": null,
                  "name": "Pinchflat",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/kieraneglin/pinchflat:latest@sha256:01b4f98aabaf3f5fe394213f7a32578c9e84e42080f52e2f8334021a4473b202"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "IANA timezone used for schedules.",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Pinchflat HTTP listener used by Railway.",
                      "defaultValue": "8945"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity.",
                      "defaultValue": "info"
                    },
                    "MEDIA_PATH": {
                      "isOptional": false,
                      "description": "Downloaded media directory inside the persistent data volume.",
                      "defaultValue": "/config/downloads"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Generated secret for signed and encrypted browser state.",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "BASIC_AUTH_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password protecting the UI and management routes.",
                      "defaultValue": "{{BASIC_AUTH_PASSWORD}}"
                    },
                    "BASIC_AUTH_USERNAME": {
                      "isOptional": false,
                      "description": "Generated-credential login username.",
                      "defaultValue": "pinchflat"
                    },
                    "YT_DLP_WORKER_CONCURRENCY": {
                      "isOptional": false,
                      "description": "One download worker per queue to bound starter resource use.",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8945
                      }
                    }
                  },
                  "volumeMounts": {
                    "2530464a-2da4-444d-928e-d52952cf7e62": {
                      "sizeMB": 5000,
                      "mountPath": "/config"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Pinchflat",
      "method": "GET",
      "path": "/healthcheck",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T22:14:43.398Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T19:11:27.885Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8ff2067edd2648e1a5f7",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 84,
    "typical_build_seconds": 1,
    "typical_start_seconds": 18,
    "slowest_service": "Pinchflat"
  }
}
