{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a0f35015-c954-4839-aa8b-0e919a5322ba",
    "slug": "OJXBP4",
    "name": "Casdoor",
    "description": "A UI-first Identity Access Management (IAM) / Single-Sign-On (SSO) platform",
    "url": "https://railway.com/deploy/OJXBP4",
    "upstream": {
      "image": "casbin/casdoor:latest"
    }
  },
  "services": [
    {
      "name": "casdoor",
      "source": {
        "image": "casbin/casdoor:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "casdoor",
      "description": "Default http port for ui",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "driverName",
      "service": "casdoor",
      "description": "database type",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "dataSourceName",
      "service": "casdoor",
      "description": "Database Config string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "volume mount point",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Connecting variables for convenience.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Connecting variables",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Connecting variables",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Just connecting variables for UI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Connecting variables",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "default db name",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "default database connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "default postgres user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "time to expire ssl cert",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Default postgres password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PRIVATE_URL",
      "service": "Postgres",
      "description": "default private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "OJXBP4"
      }
    },
    "cli": "railway deploy --template OJXBP4",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a0f35015-c954-4839-aa8b-0e919a5322ba",
            "serializedConfig": {
              "services": {
                "984c9607-699d-4b8a-92a5-cf8da1206fc3": {
                  "name": "casdoor",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "casbin/casdoor:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Default http port for ui",
                      "defaultValue": "8000"
                    },
                    "driverName": {
                      "isOptional": true,
                      "description": "database type",
                      "defaultValue": "postgres"
                    },
                    "dataSourceName": {
                      "isOptional": true,
                      "description": "Database Config string",
                      "defaultValue": "user=${{Postgres.PGUSER}} password=${{Postgres.PGPASSWORD}} host=${{Postgres.PGHOST}} port=${{Postgres.PGPORT}} sslmode=disable dbname=${{Postgres.PGDATABASE}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "ac7ae373-aa11-4667-8a79-3cbf297193a7": {
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:latest"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": true,
                      "description": "volume mount point",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": true,
                      "description": "Connecting variables for convenience.",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": true,
                      "description": "Connecting variables",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "PGUSER": {
                      "isOptional": true,
                      "description": "Connecting variables",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": true,
                      "description": "Just connecting variables for UI",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Connecting variables",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": true,
                      "description": "default db name",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": true,
                      "description": "default database connection string",
                      "defaultValue": "postgres://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "default postgres user",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "time to expire ssl cert",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Default postgres password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PRIVATE_URL": {
                      "isOptional": true,
                      "description": "default private connection string",
                      "defaultValue": "postgres://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "ac7ae373-aa11-4667-8a79-3cbf297193a7": {
                      "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-22T22:14:50.114Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T15:59:47.509Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_081d4393d2b84807bf75",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 86,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "casdoor"
  }
}
