{
  "manifest_version": "1.0.0",
  "template": {
    "id": "308f2589-788c-4a89-9cee-c0be761c4d91",
    "slug": "pdpp-core-template-source",
    "name": "PDPP Core Template Source",
    "description": "Deploy a PDPP Core node with Railway Postgres.",
    "url": "https://railway.com/deploy/pdpp-core-template-source",
    "upstream": {
      "image": "ghcr.io/vana-com/pdpp/railway-core:sha-6581820"
    }
  },
  "services": [
    {
      "name": "core",
      "source": {
        "image": "ghcr.io/vana-com/pdpp/railway-core:sha-6581820"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PDPP_DATABASE_URL",
      "service": "core",
      "description": "Provide a value for PDPP_DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PDPP_OWNER_PASSWORD",
      "service": "core",
      "description": "Provide a value for PDPP_OWNER_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PDPP_REFERENCE_ORIGIN",
      "service": "core",
      "description": "Provide a value for PDPP_REFERENCE_ORIGIN.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pdpp-core-template-source"
      }
    },
    "cli": "railway deploy --template pdpp-core-template-source",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "308f2589-788c-4a89-9cee-c0be761c4d91",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2121feff-53a0-4655-bbb1-336d0bc66c19": {
                  "icon": null,
                  "name": "core",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/vana-com/pdpp/railway-core:sha-6581820"
                  },
                  "variables": {
                    "PDPP_DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "PDPP_OWNER_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{PDPP_OWNER_PASSWORD}}"
                    },
                    "PDPP_REFERENCE_ORIGIN": {
                      "isOptional": false,
                      "defaultValue": "https://${{core.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "ba18301d-f19f-4f61-a474-ac07ba38d83b": {
                  "icon": null,
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}/pgdata"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "postgresql://postgres:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "ba18301d-f19f-4f61-a474-ac07ba38d83b": {
                      "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."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T10:22:52.265Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_4313c0999d5f4b44aa34",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 101,
    "typical_build_seconds": 0,
    "typical_start_seconds": 40,
    "slowest_service": "core"
  }
}
