{
  "manifest_version": "1.0.0",
  "template": {
    "id": "23d2bee0-ef3d-4cb6-aaa5-b9557b7dabe3",
    "slug": "OpUzwe",
    "name": "PgBouncer",
    "description": "Lightweight connection pooler for PostgreSQL",
    "url": "https://railway.com/deploy/OpUzwe",
    "upstream": {
      "image": "railwayapp/pgbouncer:latest"
    }
  },
  "services": [
    {
      "name": "PgBouncer",
      "source": {
        "image": "railwayapp/pgbouncer:latest"
      },
      "needs_volume": false,
      "tcp_ports": [
        6432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DATABASE_URL",
      "service": "PgBouncer",
      "description": "Private Database URL for PgBouncer",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRESQL_HOST",
      "service": "PgBouncer",
      "description": "Default Host reference variable<br>change namespace if needed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRESQL_PORT",
      "service": "PgBouncer",
      "description": "Default internal Port that Postgres listens on",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGBOUNCER_DATABASE",
      "service": "PgBouncer",
      "description": "Expose the same database as passed in",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "PgBouncer",
      "description": "Public Database URL for PgBouncer",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGBOUNCER_POOL_MODE",
      "service": "PgBouncer",
      "description": "PgBouncer pool mode. Allowed values: session, transaction and statement. Default: session",
      "secret": false,
      "strategy": "default",
      "default": "session"
    },
    {
      "key": "POSTGRESQL_DATABASE",
      "service": "PgBouncer",
      "description": "Default Database reference variable<br>change namespace if needed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRESQL_PASSWORD",
      "service": "PgBouncer",
      "description": "Default Password reference variable<br>change namespace if needed",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRESQL_USERNAME",
      "service": "PgBouncer",
      "description": "Default Username reference variable<br>change namespace if needed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGBOUNCER_LISTEN_ADDRESS",
      "service": "PgBouncer",
      "description": "Listen on both IPv6 and IPv4 interfaces",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "PGBOUNCER_MAX_CLIENT_CONN",
      "service": "PgBouncer",
      "description": "PgBouncer maximum number of client connections allowed. Default: 120",
      "secret": false,
      "strategy": "default",
      "default": "120"
    },
    {
      "key": "PGBOUNCER_DEFAULT_POOL_SIZE",
      "service": "PgBouncer",
      "description": "PgBouncer maximum server connections to allow per user/database pair. Default: 20",
      "secret": false,
      "strategy": "default",
      "default": "20"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "OpUzwe"
      }
    },
    "cli": "railway deploy --template OpUzwe",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "23d2bee0-ef3d-4cb6-aaa5-b9557b7dabe3",
            "serializedConfig": {
              "services": {
                "5d9fbd7e-c622-49cc-bbfd-7f9c8e179048": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "PgBouncer",
                  "build": {},
                  "deploy": {},
                  "source": {
                    "image": "railwayapp/pgbouncer:latest"
                  },
                  "variables": {
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private Database URL for PgBouncer",
                      "defaultValue": "postgres://${{POSTGRESQL_USERNAME}}:${{POSTGRESQL_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6432/${{POSTGRESQL_DATABASE}}"
                    },
                    "POSTGRESQL_HOST": {
                      "isOptional": false,
                      "description": "Default Host reference variable<br>change namespace if needed",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "POSTGRESQL_PORT": {
                      "isOptional": false,
                      "description": "Default internal Port that Postgres listens on",
                      "defaultValue": "5432"
                    },
                    "PGBOUNCER_DATABASE": {
                      "isOptional": false,
                      "description": "Expose the same database as passed in",
                      "defaultValue": "${{POSTGRESQL_DATABASE}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public Database URL for PgBouncer",
                      "defaultValue": "postgres://${{POSTGRESQL_USERNAME}}:${{POSTGRESQL_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{POSTGRESQL_DATABASE}}"
                    },
                    "PGBOUNCER_POOL_MODE": {
                      "isOptional": false,
                      "description": "PgBouncer pool mode. Allowed values: session, transaction and statement. Default: session",
                      "defaultValue": "session"
                    },
                    "POSTGRESQL_DATABASE": {
                      "isOptional": false,
                      "description": "Default Database reference variable<br>change namespace if needed",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "POSTGRESQL_PASSWORD": {
                      "isOptional": false,
                      "description": "Default Password reference variable<br>change namespace if needed",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "POSTGRESQL_USERNAME": {
                      "isOptional": false,
                      "description": "Default Username reference variable<br>change namespace if needed",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "PGBOUNCER_LISTEN_ADDRESS": {
                      "isOptional": false,
                      "description": "Listen on both IPv6 and IPv4 interfaces",
                      "defaultValue": "*"
                    },
                    "PGBOUNCER_MAX_CLIENT_CONN": {
                      "isOptional": false,
                      "description": "PgBouncer maximum number of client connections allowed. Default: 120",
                      "defaultValue": "120"
                    },
                    "PGBOUNCER_DEFAULT_POOL_SIZE": {
                      "isOptional": false,
                      "description": "PgBouncer maximum server connections to allow per user/database pair. Default: 20",
                      "defaultValue": "20"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T22:14:43.398Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-10T08:08:58.684Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_21eb29d57bd74f90b2ef",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "CRASHED"
      }
    ]
  }
}
