{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7a115d9d-f98f-4b38-9164-70d1fbc93f13",
    "slug": "castopod-1",
    "name": "Castopod",
    "description": "Self-hosted podcast hosting with Fediverse support",
    "url": "https://railway.com/deploy/castopod-1",
    "upstream": {
      "image": "castopod/castopod:1.15.5"
    }
  },
  "services": [
    {
      "name": "mariadb",
      "source": {
        "image": "mariadb:12.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "castopod",
      "source": {
        "image": "castopod/castopod:1.15.5"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/public/media",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQL_USER",
      "service": "mariadb",
      "description": "Application DB user",
      "secret": false,
      "strategy": "default",
      "default": "castopod"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "mariadb",
      "description": "Database name for Castopod",
      "secret": false,
      "strategy": "default",
      "default": "castopod"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "mariadb",
      "description": "App DB user password — auto-generated. Castopod's CP_DATABASE_PASSWORD references this.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "mariadb",
      "description": "MySQL root password — auto-generated, separate from the app password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CP_BASEURL",
      "service": "castopod",
      "description": "REQUIRED — the public URL of this service, ending with a trailing slash. Auto-filled from this service's public domain; override to use your own custom domain. The bootstrap fails without it.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CP_ENABLE_2FA",
      "service": "castopod",
      "description": "Enable TOTP two-factor authentication for logins. Leave false to skip 2FA.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "castopod",
      "description": "REQUIRED — run the container as root (uid 0). Castopod's s6-overlay services have no per-service user and inherit the container user. With the default image user (www-data, uid 33), the root-owned Railway volume at /app/public/media is not writable and the bootstrap fails. Setting 0 boots every fresh install cleanly. MariaDB does NOT need this.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "CP_DATABASE_NAME",
      "service": "castopod",
      "description": "Automatically wired from the MariaDB companion service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CP_ANALYTICS_SALT",
      "service": "castopod",
      "description": "REQUIRED — a random 64-character string used for analytics hashing. This placeholder auto-generates one for you. Do not reuse an existing salt.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CP_DATABASE_HOSTNAME",
      "service": "castopod",
      "description": "Automatically wired from the MariaDB companion service (private domain). If you see a literal service name here, check the companion mapping.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CP_DATABASE_PASSWORD",
      "service": "castopod",
      "description": "Automatically wired from the MariaDB companion service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CP_DATABASE_USERNAME",
      "service": "castopod",
      "description": "Automatically wired from the MariaDB companion service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "castopod-1"
      }
    },
    "cli": "railway deploy --template castopod-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7a115d9d-f98f-4b38-9164-70d1fbc93f13",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "afa00a6b-c521-4fa1-9de1-e398337736a7": {
                  "icon": null,
                  "name": "mariadb",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:12.1"
                  },
                  "variables": {
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "Application DB user",
                      "defaultValue": "castopod"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database name for Castopod",
                      "defaultValue": "castopod"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "App DB user password — auto-generated. Castopod's CP_DATABASE_PASSWORD references this.",
                      "defaultValue": "{{MYSQL_PASSWORD}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "MySQL root password — auto-generated, separate from the app password.",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "afa00a6b-c521-4fa1-9de1-e398337736a7": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "c6871866-65ac-4821-a65c-2e44ed395fb0": {
                  "icon": null,
                  "name": "castopod",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "castopod/castopod:1.15.5"
                  },
                  "variables": {
                    "CP_BASEURL": {
                      "isOptional": false,
                      "description": "REQUIRED — the public URL of this service, ending with a trailing slash. Auto-filled from this service's public domain; override to use your own custom domain. The bootstrap fails without it.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/"
                    },
                    "CP_EMAIL_FROM": {
                      "isOptional": true,
                      "description": "Optional — the From address for outgoing mail (e.g. noreply@your-podcast-domain.com).",
                      "defaultValue": ""
                    },
                    "CP_ENABLE_2FA": {
                      "description": "Enable TOTP two-factor authentication for logins. Leave false to skip 2FA.",
                      "defaultValue": "false"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "REQUIRED — run the container as root (uid 0). Castopod's s6-overlay services have no per-service user and inherit the container user. With the default image user (www-data, uid 33), the root-owned Railway volume at /app/public/media is not writable and the bootstrap fails. Setting 0 boots every fresh install cleanly. MariaDB does NOT need this.",
                      "defaultValue": "0"
                    },
                    "CP_DATABASE_NAME": {
                      "isOptional": false,
                      "description": "Automatically wired from the MariaDB companion service.",
                      "defaultValue": "${{mariadb.MYSQL_DATABASE}}"
                    },
                    "CP_MEDIA_BASEURL": {
                      "isOptional": true,
                      "description": "Optional — a separate public domain for media delivery (e.g. an S3-backed domain or CDN). Leave empty to use CP_BASEURL (default — media served from the same domain as the app).",
                      "defaultValue": ""
                    },
                    "CP_ANALYTICS_SALT": {
                      "isOptional": false,
                      "description": "REQUIRED — a random 64-character string used for analytics hashing. This placeholder auto-generates one for you. Do not reuse an existing salt.",
                      "defaultValue": "{{CP_ANALYTICS_SALT}}"
                    },
                    "CP_EMAIL_SMTP_HOST": {
                      "isOptional": true,
                      "description": "Optional — SMTP host for outgoing mail. Leave empty if you don't need email (login, forgot-password).",
                      "defaultValue": ""
                    },
                    "CP_DATABASE_HOSTNAME": {
                      "description": "Automatically wired from the MariaDB companion service (private domain). If you see a literal service name here, check the companion mapping.",
                      "defaultValue": "${{mariadb.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "CP_DATABASE_PASSWORD": {
                      "isOptional": false,
                      "description": "Automatically wired from the MariaDB companion service.",
                      "defaultValue": "${{mariadb.MYSQL_PASSWORD}}"
                    },
                    "CP_DATABASE_USERNAME": {
                      "isOptional": false,
                      "description": "Automatically wired from the MariaDB companion service.",
                      "defaultValue": "${{mariadb.MYSQL_USER}}"
                    },
                    "CP_EMAIL_SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "Optional — SMTP password.",
                      "defaultValue": ""
                    },
                    "CP_EMAIL_SMTP_USERNAME": {
                      "isOptional": true,
                      "description": "Optional — SMTP username.",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "c6871866-65ac-4821-a65c-2e44ed395fb0": {
                      "mountPath": "/app/public/media"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T22:14:40.394Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-15T19:51:07.706Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_30614d625bfd4484bd78",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 38,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "castopod"
  }
}
