{
  "manifest_version": "1.0.0",
  "template": {
    "id": "77d7b3b1-1c32-421d-9aed-1f5aa5760d39",
    "slug": "Iy1rFN",
    "name": "NATS JetStream HA",
    "description": "NATS JetStream cluster with 3 servers",
    "url": "https://railway.com/deploy/Iy1rFN"
  },
  "services": [
    {
      "name": "server-1",
      "source": {
        "image": "ghcr.io/jri98/nats-jetstream-ha:main"
      },
      "needs_volume": true,
      "volume_mount_path": "/nats",
      "http": false
    },
    {
      "name": "server-2",
      "source": {
        "image": "ghcr.io/jri98/nats-jetstream-ha:main"
      },
      "needs_volume": true,
      "volume_mount_path": "/nats",
      "http": false
    },
    {
      "name": "server-3",
      "source": {
        "image": "ghcr.io/jri98/nats-jetstream-ha:main"
      },
      "needs_volume": true,
      "volume_mount_path": "/nats",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "SERVER_NAME",
      "service": "server-1",
      "description": "Unique name of the server in the cluster.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLUSTER_ROUTES_SEED",
      "service": "server-1",
      "description": "Routes for bootstrapping the cluster.",
      "secret": false,
      "strategy": "default",
      "default": "nats://localhost:6222"
    },
    {
      "key": "JETSTREAM_STORE_DIR",
      "service": "server-1",
      "description": "Directory for the JetStream store.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_NAME",
      "service": "server-2",
      "description": "Unique name of the server in the cluster.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLUSTER_ROUTES_SEED",
      "service": "server-2",
      "description": "Routes for bootstrapping the cluster.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "JETSTREAM_STORE_DIR",
      "service": "server-2",
      "description": "Directory for the JetStream store.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_NAME",
      "service": "server-3",
      "description": "Unique name of the server in the cluster.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLUSTER_ROUTES_SEED",
      "service": "server-3",
      "description": "Routes for bootstrapping the cluster.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "JETSTREAM_STORE_DIR",
      "service": "server-3",
      "description": "Directory for the JetStream store.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "Iy1rFN"
      }
    },
    "cli": "railway deploy --template Iy1rFN",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "77d7b3b1-1c32-421d-9aed-1f5aa5760d39",
            "serializedConfig": {
              "services": {
                "04cb6419-9533-472d-b00b-0eee687ee274": {
                  "icon": "https://images.seeklogo.com/logo-png/43/1/nats-logo-png_seeklogo-430972.png",
                  "name": "server-1",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/jri98/nats-jetstream-ha:main"
                  },
                  "variables": {
                    "SERVER_NAME": {
                      "description": "Unique name of the server in the cluster.",
                      "defaultValue": "${{RAILWAY_SERVICE_NAME}}"
                    },
                    "CLUSTER_ROUTES_SEED": {
                      "isOptional": false,
                      "description": "Routes for bootstrapping the cluster.",
                      "defaultValue": "nats://localhost:6222"
                    },
                    "JETSTREAM_STORE_DIR": {
                      "description": "Directory for the JetStream store.",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}"
                    }
                  },
                  "volumeMounts": {
                    "04cb6419-9533-472d-b00b-0eee687ee274": {
                      "mountPath": "/nats"
                    }
                  }
                },
                "24185c2b-9a1c-4cec-97c9-853f222df304": {
                  "icon": "https://images.seeklogo.com/logo-png/43/1/nats-logo-png_seeklogo-430972.png",
                  "name": "server-2",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/jri98/nats-jetstream-ha:main"
                  },
                  "variables": {
                    "SERVER_NAME": {
                      "description": "Unique name of the server in the cluster.",
                      "defaultValue": "${{RAILWAY_SERVICE_NAME}}"
                    },
                    "CLUSTER_ROUTES_SEED": {
                      "isOptional": false,
                      "description": "Routes for bootstrapping the cluster.",
                      "defaultValue": "nats://${{server-1.RAILWAY_PRIVATE_DOMAIN}}:6222"
                    },
                    "JETSTREAM_STORE_DIR": {
                      "description": "Directory for the JetStream store.",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}"
                    }
                  },
                  "volumeMounts": {
                    "24185c2b-9a1c-4cec-97c9-853f222df304": {
                      "mountPath": "/nats"
                    }
                  }
                },
                "f33fc4d4-835e-4927-9325-aa8e823a1699": {
                  "icon": "https://images.seeklogo.com/logo-png/43/1/nats-logo-png_seeklogo-430972.png",
                  "name": "server-3",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/jri98/nats-jetstream-ha:main"
                  },
                  "variables": {
                    "SERVER_NAME": {
                      "description": "Unique name of the server in the cluster.",
                      "defaultValue": "${{RAILWAY_SERVICE_NAME}}"
                    },
                    "CLUSTER_ROUTES_SEED": {
                      "isOptional": false,
                      "description": "Routes for bootstrapping the cluster.",
                      "defaultValue": "nats://${{server-1.RAILWAY_PRIVATE_DOMAIN}}:6222"
                    },
                    "JETSTREAM_STORE_DIR": {
                      "description": "Directory for the JetStream store.",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}"
                    }
                  },
                  "volumeMounts": {
                    "f33fc4d4-835e-4927-9325-aa8e823a1699": {
                      "mountPath": "/nats"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T10:14:42.516Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T11:57:43.663Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_5e36bc294aad4e2ab667",
    "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": 10,
    "slowest_service": "server-3"
  }
}
