{
  "manifest_version": "1.0.0",
  "template": {
    "id": "cae62e72-15da-441b-a9b1-af4da298e5bd",
    "slug": "citus-postgres-17-cluster",
    "name": "Citus Postgres 17 Cluster",
    "description": "Deploy and host a Citus Postgres 17 Cluster with Railway",
    "url": "https://railway.com/deploy/citus-postgres-17-cluster"
  },
  "services": [
    {
      "name": "worker2",
      "source": {
        "repo": "https://github.com/castab/citus-postgres-17-ssl"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "coordinator",
      "source": {
        "repo": "https://github.com/castab/citus-postgres-17-ssl"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "worker1",
      "source": {
        "repo": "https://github.com/castab/citus-postgres-17-ssl"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "registrar",
      "source": {
        "repo": "https://github.com/castab/citus-postgres-17-ssl"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "worker2",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "worker2",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_USER",
      "service": "worker2",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "worker2",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "coordinator",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "coordinator",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_USER",
      "service": "coordinator",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "coordinator",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDATA",
      "service": "worker1",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "worker1",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_USER",
      "service": "worker1",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "worker1",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "registrar",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "COORDINATOR_HOST",
      "service": "registrar",
      "description": "Provide a value for COORDINATOR_HOST.",
      "secret": false,
      "strategy": "default",
      "default": "coordinator.railway.internal"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "registrar",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "citus-postgres-17-cluster"
      }
    },
    "cli": "railway deploy --template citus-postgres-17-cluster",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "cae62e72-15da-441b-a9b1-af4da298e5bd",
            "serializedConfig": {
              "services": {
                "7edefbae-9ee5-4207-b0f7-dee87e73d75c": {
                  "name": "worker2",
                  "source": {
                    "repo": "castab/citus-postgres-17-ssl",
                    "branch": null,
                    "rootDirectory": "worker"
                  },
                  "variables": {
                    "PGDATA": {
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_USER": {
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "defaultValue": "${{ coordinator.POSTGRES_PASSWORD }}"
                    }
                  },
                  "volumeMounts": {
                    "7edefbae-9ee5-4207-b0f7-dee87e73d75c": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "89cdcd34-e7f3-4913-ae01-f2ff16e6d063": {
                  "name": "coordinator",
                  "source": {
                    "repo": "castab/citus-postgres-17-ssl",
                    "branch": null,
                    "rootDirectory": "coordinator"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    }
                  },
                  "volumeMounts": {
                    "89cdcd34-e7f3-4913-ae01-f2ff16e6d063": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "b14b7021-89f5-4a32-8bf0-28228484e60a": {
                  "name": "worker1",
                  "source": {
                    "repo": "castab/citus-postgres-17-ssl",
                    "branch": null,
                    "rootDirectory": "worker"
                  },
                  "variables": {
                    "PGDATA": {
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_USER": {
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "defaultValue": "${{ coordinator.POSTGRES_PASSWORD }}"
                    }
                  },
                  "volumeMounts": {
                    "b14b7021-89f5-4a32-8bf0-28228484e60a": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "fea260fb-4e9d-4235-82ce-fe5cb77eaf2e": {
                  "name": "registrar",
                  "source": {
                    "repo": "castab/citus-postgres-17-ssl",
                    "branch": null,
                    "rootDirectory": "registrar"
                  },
                  "variables": {
                    "POSTGRES_USER": {
                      "defaultValue": "postgres"
                    },
                    "COORDINATOR_HOST": {
                      "defaultValue": "coordinator.railway.internal"
                    },
                    "POSTGRES_PASSWORD": {
                      "defaultValue": "${{ coordinator.POSTGRES_PASSWORD }}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T17:23:08.654Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_2403bd178e984598846f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 156,
    "typical_build_seconds": 42,
    "typical_start_seconds": 10,
    "slowest_service": "registrar"
  }
}
