{
  "manifest_version": "1.0.0",
  "template": {
    "id": "546cafcd-50c3-42b3-a878-0917de58c166",
    "slug": "ghost-3",
    "name": "Ghost",
    "description": "Ghost — self-hosted publishing platform for blogs and newsletters",
    "url": "https://railway.com/deploy/ghost-3",
    "upstream": {
      "image": "ghost:latest"
    }
  },
  "services": [
    {
      "name": "ghost",
      "source": {
        "image": "ghost:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": true
    },
    {
      "name": "ghost-mariadb",
      "source": {
        "image": "mariadb:11.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "url",
      "service": "ghost",
      "description": "Ghost public URL. Auto-configured via Railway public domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "ghost",
      "description": "Ghost application port. Railway injects PORT for routing.",
      "secret": false,
      "strategy": "default",
      "default": "2368"
    },
    {
      "key": "database__client",
      "service": "ghost",
      "description": "Database client type (mysql for production, sqlite3 for standalone).",
      "secret": false,
      "strategy": "default",
      "default": "mysql"
    },
    {
      "key": "database__connection__host",
      "service": "ghost",
      "description": "MariaDB hostname. Matches the companion service name for private networking.",
      "secret": false,
      "strategy": "default",
      "default": "ghost-mariadb"
    },
    {
      "key": "database__connection__port",
      "service": "ghost",
      "description": "MariaDB port.",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "database__connection__user",
      "service": "ghost",
      "description": "MariaDB username. Auto-matched to ghost-mariadb service's MYSQL_USER.",
      "secret": false,
      "strategy": "default",
      "default": "ghost"
    },
    {
      "key": "database__connection__database",
      "service": "ghost",
      "description": "MariaDB database name. Auto-matched to ghost-mariadb service's MYSQL_DATABASE.",
      "secret": false,
      "strategy": "default",
      "default": "ghost"
    },
    {
      "key": "database__connection__password",
      "service": "ghost",
      "description": "MariaDB password. Auto-refs ghost-mariadb service's MYSQL_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_USER",
      "service": "ghost-mariadb",
      "description": "MariaDB username for Ghost application access.",
      "secret": false,
      "strategy": "default",
      "default": "ghost"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "ghost-mariadb",
      "description": "MariaDB database name for Ghost tables.",
      "secret": false,
      "strategy": "default",
      "default": "ghost"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "ghost-mariadb",
      "description": "MariaDB password for Ghost user. Auto-generated on first deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "ghost-mariadb",
      "description": "MariaDB root password. Auto-generated on first deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ghost-3"
      }
    },
    "cli": "railway deploy --template ghost-3",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "546cafcd-50c3-42b3-a878-0917de58c166",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "309538a0-f496-4370-9a51-0e914a60a39e": {
                  "icon": null,
                  "name": "ghost",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghost:latest"
                  },
                  "variables": {
                    "url": {
                      "isOptional": false,
                      "description": "Ghost public URL. Auto-configured via Railway public domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Ghost application port. Railway injects PORT for routing.",
                      "defaultValue": "2368"
                    },
                    "database__client": {
                      "isOptional": false,
                      "description": "Database client type (mysql for production, sqlite3 for standalone).",
                      "defaultValue": "mysql"
                    },
                    "database__connection__host": {
                      "isOptional": false,
                      "description": "MariaDB hostname. Matches the companion service name for private networking.",
                      "defaultValue": "ghost-mariadb"
                    },
                    "database__connection__port": {
                      "isOptional": false,
                      "description": "MariaDB port.",
                      "defaultValue": "3306"
                    },
                    "database__connection__user": {
                      "isOptional": false,
                      "description": "MariaDB username. Auto-matched to ghost-mariadb service's MYSQL_USER.",
                      "defaultValue": "ghost"
                    },
                    "database__connection__database": {
                      "isOptional": false,
                      "description": "MariaDB database name. Auto-matched to ghost-mariadb service's MYSQL_DATABASE.",
                      "defaultValue": "ghost"
                    },
                    "database__connection__password": {
                      "isOptional": false,
                      "description": "MariaDB password. Auto-refs ghost-mariadb service's MYSQL_PASSWORD.",
                      "defaultValue": "${{ghost-mariadb.MYSQL_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:2368": {
                        "port": 2368
                      }
                    }
                  },
                  "volumeMounts": {
                    "309538a0-f496-4370-9a51-0e914a60a39e": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "a9007f32-79c4-4aa1-89d0-145b3b4f554a": {
                  "icon": null,
                  "name": "ghost-mariadb",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:11.0"
                  },
                  "variables": {
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "MariaDB username for Ghost application access.",
                      "defaultValue": "ghost"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "MariaDB database name for Ghost tables.",
                      "defaultValue": "ghost"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "MariaDB password for Ghost user. Auto-generated on first deploy.",
                      "defaultValue": "{{MYSQL_PASSWORD}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "MariaDB root password. Auto-generated on first deploy.",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "a9007f32-79c4-4aa1-89d0-145b3b4f554a": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T02:04:53.862Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fe0749fb2060435aa591",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 93,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "ghost"
  }
}
