{
  "manifest_version": "1.0.0",
  "template": {
    "id": "51e9e288-c3fd-48e7-a11d-69e442a82c2d",
    "slug": "rails-8-hotwire",
    "name": "Rails 8 + Hotwire",
    "description": "A simple template for full stack Ruby on Rails 8 apps using turbo/hotwire",
    "url": "https://railway.com/deploy/rails-8-hotwire",
    "upstream": {
      "repo_url": "https://github.com/jtmst/rails-hotwire-starter"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Rails 8 App",
      "source": {
        "repo": "https://github.com/jtmst/rails-hotwire-starter"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "PSQL Data directory",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "PSQL Host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "PSQL Port",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "PSQL User",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "PSQL Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "PSQL Password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "PSQL database name",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "PSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "PSQL User",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate validity days",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "PSQL Password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Deployment drain timeout",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Redis Host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redis port",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis user",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Redis public connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "Rails 8 App",
      "description": "Server port",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILS_ENV",
      "service": "Rails 8 App",
      "description": "Rails environment",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDIS_URL",
      "service": "Rails 8 App",
      "description": "Redis URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Rails 8 App",
      "description": "PSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Rails 8 App",
      "description": "Rails encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "rails-8-hotwire"
      }
    },
    "cli": "railway deploy --template rails-8-hotwire",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "51e9e288-c3fd-48e7-a11d-69e442a82c2d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "33f29995-8d1c-44a5-96d0-ec549cddc8ec": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PSQL Data directory",
                      "defaultValue": "{{PGDATA}}"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "PSQL Host",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "PSQL Port",
                      "defaultValue": "{{PGPORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "PSQL User",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "PSQL Database name",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "PSQL Password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "PSQL database name",
                      "defaultValue": "{{POSTGRES_DB}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PSQL connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PSQL User",
                      "defaultValue": "{{POSTGRES_USER}}"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate validity days",
                      "defaultValue": "{{SSL_CERT_DAYS}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "PSQL Password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public PostgreSQL connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Deployment drain timeout",
                      "defaultValue": "{{RAILWAY_DEPLOYMENT_DRAINING_SECONDS}}"
                    }
                  },
                  "volumeMounts": {
                    "33f29995-8d1c-44a5-96d0-ec549cddc8ec": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "b45aac5a-32ae-4479-84d3-5ad99d4f97a1": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis Host",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "{{REDISPORT}}"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis user",
                      "defaultValue": "{{REDISUSER}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Redis public connection string",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "b45aac5a-32ae-4479-84d3-5ad99d4f97a1": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "e4e48c0f-2aac-443b-8746-6ebd5d8ec193": {
                  "icon": "https://raw.githubusercontent.com/rails/rails/main/guides/assets/images/favicon.ico",
                  "name": "Rails 8 App",
                  "deploy": {
                    "startCommand": "bin/rails server -b 0.0.0.0 -p $PORT",
                    "healthcheckPath": "/up",
                    "preDeployCommand": [
                      "bundle exec rails db:migrate"
                    ],
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/jtmst/rails-hotwire-starter",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Server port",
                      "defaultValue": "{{PORT}}"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "{{RAILS_ENV}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis URL",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Rails encryption key",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Rails 8 App",
      "method": "GET",
      "path": "/up",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T05:54:19.399Z",
  "generator_version": "0.1.0"
}
