{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fcfa0b85-b5e7-4e42-bd70-1bb98098c599",
    "slug": "ghost-substack-medium-alternativebold-bl",
    "name": "Ghost (Substack / Medium Alternative)bold-blue",
    "description": "Self-hosted publishing & newsletter platform. Own your audience.",
    "url": "https://railway.com/deploy/ghost-substack-medium-alternativebold-bl",
    "upstream": {
      "image": "ghost:5.130.6"
    }
  },
  "services": [
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:8.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "ghost:5.130.6",
      "source": {
        "image": "ghost:5.130.6"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/ghost/content",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL port.",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "MySQL user, used for the Data panel.",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "URL to connect to MySQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Default database, used for Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Root password, used for Data panel.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database to be created on image startup.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password for MySQL DB.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "url",
      "service": "ghost:5.130.6",
      "description": "Public URL of your Ghost site (links, admin, email).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_ENV",
      "service": "ghost:5.130.6",
      "description": "Run Ghost in production mode (required for MySQL).",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "database__client",
      "service": "ghost:5.130.6",
      "description": "Use MySQL; Ghost 5 does not support SQLite in production.",
      "secret": false,
      "strategy": "default",
      "default": "mysql"
    },
    {
      "key": "database__connection__host",
      "service": "ghost:5.130.6",
      "description": "Private hostname of the MySQL service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__port",
      "service": "ghost:5.130.6",
      "description": "MySQL port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__user",
      "service": "ghost:5.130.6",
      "description": "MySQL user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__database",
      "service": "ghost:5.130.6",
      "description": "MySQL database name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__password",
      "service": "ghost:5.130.6",
      "description": "MySQL password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ghost-substack-medium-alternativebold-bl"
      }
    },
    "cli": "railway deploy --template ghost-substack-medium-alternativebold-bl",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fcfa0b85-b5e7-4e42-bd70-1bb98098c599",
            "serializedConfig": {
              "services": {
                "5ee20b4e-253e-4314-950b-af44cb3f1b68": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "requiredMountPath": "/var/lib/mysql"
                  },
                  "source": {
                    "image": "mysql:8.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL port.",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "MySQL user, used for the Data panel.",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "URL to connect to MySQL.",
                      "defaultValue": "mysql://${{ MYSQLUSER }}:${{ MYSQL_ROOT_PASSWORD }}@${{ RAILWAY_PRIVATE_DOMAIN }}:3306/${{ MYSQL_DATABASE }}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Default database, used for Data panel.",
                      "defaultValue": "${{ MYSQL_DATABASE }}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Root password, used for Data panel.",
                      "defaultValue": "${{ MYSQL_ROOT_PASSWORD }}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database to be created on image startup.",
                      "defaultValue": "railway"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password for MySQL DB.",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "5ee20b4e-253e-4314-950b-af44cb3f1b68": {
                      "mountPath": "/var/lib/mysql",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  },
                  "haTemplateCode": "mysql-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "MySQL Replicas",
                      "options": [
                        2,
                        4,
                        6,
                        8
                      ],
                      "nodeLabel": "MySQL",
                      "description": "Requires odd count for quorum",
                      "defaultValue": 2
                    },
                    "description": "This will convert your MySQL instance to an HA cluster with Group Replication failover and HAProxy routing to the primary.",
                    "supportedImageMajorVersions": [
                      8,
                      9
                    ]
                  }
                },
                "74587d15-14d3-4a5a-9132-c0ddc7b50730": {
                  "name": "ghost:5.130.6",
                  "source": {
                    "image": "ghost:5.130.6"
                  },
                  "variables": {
                    "url": {
                      "description": "Public URL of your Ghost site (links, admin, email).",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NODE_ENV": {
                      "description": "Run Ghost in production mode (required for MySQL).",
                      "defaultValue": "production"
                    },
                    "database__client": {
                      "description": "Use MySQL; Ghost 5 does not support SQLite in production.",
                      "defaultValue": "mysql"
                    },
                    "database__connection__host": {
                      "description": "Private hostname of the MySQL service.",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "database__connection__port": {
                      "description": "MySQL port.",
                      "defaultValue": "${{MySQL.MYSQLPORT}}"
                    },
                    "database__connection__user": {
                      "description": "MySQL user.",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "database__connection__database": {
                      "description": "MySQL database name.",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "database__connection__password": {
                      "description": "MySQL password.",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:2368": {
                        "port": 2368
                      }
                    }
                  },
                  "volumeMounts": {
                    "74587d15-14d3-4a5a-9132-c0ddc7b50730": {
                      "mountPath": "/var/lib/ghost/content",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-09T00:02:40.379Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T06:56:00.870Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_db2d5459b44049b9b590",
    "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": 20,
    "slowest_service": "ghost:5.130.6"
  }
}
