{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ae6f4fef-3f0c-447c-b295-887c816f3d79",
    "slug": "pgdog-pooler",
    "name": "PgDog",
    "description": "PostgreSQL proxy that pools connections and splits reads from writes",
    "url": "https://railway.com/deploy/pgdog-pooler",
    "upstream": {
      "image": "sosedoff/pgweb:latest"
    }
  },
  "services": [
    {
      "name": "postgres-replica",
      "source": {
        "repo": "https://github.com/gridalpha/postgresql-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "pgdog",
      "source": {
        "repo": "https://github.com/gridalpha/pgdog-railway"
      },
      "needs_volume": false,
      "tcp_ports": [
        6432
      ],
      "http": false
    },
    {
      "name": "postgres",
      "source": {
        "repo": "https://github.com/gridalpha/postgresql-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "pgweb",
      "source": {
        "image": "sosedoff/pgweb:latest"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "postgres-replica",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PGDATA",
      "service": "postgres-replica",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres-replica",
      "description": "Same database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOG_TO_STDOUT",
      "service": "postgres-replica",
      "description": "Server log to stdout, not stderr",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "postgres-replica",
      "description": "Private hostname published for peers",
      "secret": false,
      "strategy": "default",
      "default": "postgres-replica.railway.internal"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "postgres-replica",
      "description": "PostgreSQL listener port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres-replica",
      "description": "Same superuser as the primary",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres-replica",
      "description": "Same superuser password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_REPLICATION_SLOT",
      "service": "postgres-replica",
      "description": "Physical slot to follow",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_REPLICATION_USER",
      "service": "postgres-replica",
      "description": "Replication role name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_REPLICATE_FROM_HOST",
      "service": "postgres-replica",
      "description": "Makes this service a standby",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_REPLICATE_FROM_PORT",
      "service": "postgres-replica",
      "description": "Primary port to clone from",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_REPLICATION_PASSWORD",
      "service": "postgres-replica",
      "description": "Replication role password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "postgres-replica",
      "description": "First boot runs a full base backup",
      "secret": false,
      "strategy": "default",
      "default": "900"
    },
    {
      "key": "POSTGRES_BASEBACKUP_WAIT_SECONDS",
      "service": "postgres-replica",
      "description": "Wait for the primary before failing",
      "secret": false,
      "strategy": "default",
      "default": "900"
    },
    {
      "key": "PORT",
      "service": "pgdog",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PGDOG_HOST",
      "service": "pgdog",
      "description": "Dual-stack client listener bind",
      "secret": false,
      "strategy": "default",
      "default": "[::]"
    },
    {
      "key": "PGDOG_PORT",
      "service": "pgdog",
      "description": "Client listener port",
      "secret": false,
      "strategy": "default",
      "default": "6432"
    },
    {
      "key": "DATABASE_URL",
      "service": "pgdog",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_DB_NAME",
      "service": "pgdog",
      "description": "Database name clients connect to",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "PGDOG_WORKERS",
      "service": "pgdog",
      "description": "Tokio worker threads",
      "secret": false,
      "strategy": "default",
      "default": "8"
    },
    {
      "key": "PGDOG_CLIENT_USER",
      "service": "pgdog",
      "description": "User clients present to PgDog",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PGDOG_POOLER_MODE",
      "service": "pgdog",
      "description": "transaction or session pooling",
      "secret": false,
      "strategy": "default",
      "default": "transaction"
    },
    {
      "key": "PGDOG_SERVER_USER",
      "service": "pgdog",
      "description": "Role PgDog connects as",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_PRIMARY_HOST",
      "service": "pgdog",
      "description": "Primary private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_PRIMARY_PORT",
      "service": "pgdog",
      "description": "Primary port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_REPLICA_PORT",
      "service": "pgdog",
      "description": "Port for replicas without one",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "pgdog",
      "description": "Public connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_MIN_POOL_SIZE",
      "service": "pgdog",
      "description": "Warm connections kept open",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PGDOG_REPLICA_HOSTS",
      "service": "pgdog",
      "description": "Comma-separated replica hosts",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_ADMIN_PASSWORD",
      "service": "pgdog",
      "description": "Unlocks the admin console database",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDOG_SERVER_DB_NAME",
      "service": "pgdog",
      "description": "Database name on PostgreSQL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_CLIENT_PASSWORD",
      "service": "pgdog",
      "description": "Password clients present to PgDog",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDOG_LSN_CHECK_DELAY",
      "service": "pgdog",
      "description": "Enables replication lag monitoring",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "PGDOG_SERVER_PASSWORD",
      "service": "pgdog",
      "description": "Password PgDog connects with",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDOG_CONNECT_ATTEMPTS",
      "service": "pgdog",
      "description": "Backend connection retries",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "PGDOG_HEALTHCHECK_PORT",
      "service": "pgdog",
      "description": "HTTP health endpoint port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PGDOG_OPENMETRICS_HOST",
      "service": "pgdog",
      "description": "Metrics listener bind",
      "secret": false,
      "strategy": "default",
      "default": "[::]"
    },
    {
      "key": "PGDOG_OPENMETRICS_PORT",
      "service": "pgdog",
      "description": "Prometheus metrics port",
      "secret": false,
      "strategy": "default",
      "default": "9090"
    },
    {
      "key": "PGDOG_READ_WRITE_SPLIT",
      "service": "pgdog",
      "description": "Reads use replicas and primary",
      "secret": false,
      "strategy": "default",
      "default": "include_primary"
    },
    {
      "key": "PGDOG_DEFAULT_POOL_SIZE",
      "service": "pgdog",
      "description": "Server connections per node",
      "secret": false,
      "strategy": "default",
      "default": "25"
    },
    {
      "key": "PGDOG_LSN_CHECK_INTERVAL",
      "service": "pgdog",
      "description": "Lag check interval in ms",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "PGDOG_BAN_REPLICA_LAG_BYTES",
      "service": "pgdog",
      "description": "Lag past which reads stop",
      "secret": false,
      "strategy": "default",
      "default": "33554432"
    },
    {
      "key": "PGDOG_CONNECT_ATTEMPT_DELAY",
      "service": "pgdog",
      "description": "Delay between retries in ms",
      "secret": false,
      "strategy": "default",
      "default": "2000"
    },
    {
      "key": "PGDOG_OPENMETRICS_NAMESPACE",
      "service": "pgdog",
      "description": "Metric name prefix",
      "secret": false,
      "strategy": "default",
      "default": "pgdog_"
    },
    {
      "key": "PGDOG_LOAD_BALANCING_STRATEGY",
      "service": "pgdog",
      "description": "Read distribution strategy",
      "secret": false,
      "strategy": "default",
      "default": "round_robin"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "pgdog",
      "description": "Health check window",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "PORT",
      "service": "postgres",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "Direct primary connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOG_TO_STDOUT",
      "service": "postgres",
      "description": "Server log to stdout, not stderr",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "postgres",
      "description": "Private hostname published for peers",
      "secret": false,
      "strategy": "default",
      "default": "postgres.railway.internal"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "postgres",
      "description": "PostgreSQL listener port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_REPLICATION_SLOT",
      "service": "postgres",
      "description": "Physical slot the standby follows",
      "secret": false,
      "strategy": "default",
      "default": "railway_standby"
    },
    {
      "key": "POSTGRES_REPLICATION_USER",
      "service": "postgres",
      "description": "Physical replication role",
      "secret": false,
      "strategy": "default",
      "default": "replicator"
    },
    {
      "key": "POSTGRES_REPLICATION_PASSWORD",
      "service": "postgres",
      "description": "Replication role password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_MAX_SLOT_WAL_KEEP_SIZE",
      "service": "postgres",
      "description": "WAL a stalled slot may pin",
      "secret": false,
      "strategy": "default",
      "default": "1GB"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "postgres",
      "description": "Health check window",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "PORT",
      "service": "pgweb",
      "description": "Anonymous metrics listener, health-checked",
      "secret": false,
      "strategy": "default",
      "default": "9090"
    },
    {
      "key": "PGWEB_AUTH_PASS",
      "service": "pgweb",
      "description": "HTTP basic auth password",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGWEB_AUTH_USER",
      "service": "pgweb",
      "description": "HTTP basic auth username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "PGWEB_DATABASE_URL",
      "service": "pgweb",
      "description": "Console connects through PgDog",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pgdog-pooler"
      }
    },
    "cli": "railway deploy --template pgdog-pooler",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ae6f4fef-3f0c-447c-b295-887c816f3d79",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "09ecc9b5-59b7-4c94-86a3-75cefa45e343": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "postgres-replica",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/postgresql-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "8080"
                    },
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Same database name",
                      "defaultValue": "${{postgres.POSTGRES_DB}}"
                    },
                    "LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Server log to stdout, not stderr",
                      "defaultValue": "true"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Private hostname published for peers",
                      "defaultValue": "postgres-replica.railway.internal"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL listener port",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Same superuser as the primary",
                      "defaultValue": "${{postgres.POSTGRES_USER}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Same superuser password",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_REPLICATION_SLOT": {
                      "isOptional": false,
                      "description": "Physical slot to follow",
                      "defaultValue": "${{postgres.POSTGRES_REPLICATION_SLOT}}"
                    },
                    "POSTGRES_REPLICATION_USER": {
                      "isOptional": false,
                      "description": "Replication role name",
                      "defaultValue": "${{postgres.POSTGRES_REPLICATION_USER}}"
                    },
                    "POSTGRES_REPLICATE_FROM_HOST": {
                      "isOptional": false,
                      "description": "Makes this service a standby",
                      "defaultValue": "${{postgres.POSTGRES_HOST}}"
                    },
                    "POSTGRES_REPLICATE_FROM_PORT": {
                      "isOptional": false,
                      "description": "Primary port to clone from",
                      "defaultValue": "${{postgres.POSTGRES_PORT}}"
                    },
                    "POSTGRES_REPLICATION_PASSWORD": {
                      "isOptional": false,
                      "description": "Replication role password",
                      "defaultValue": "${{postgres.POSTGRES_REPLICATION_PASSWORD}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot runs a full base backup",
                      "defaultValue": "900"
                    },
                    "POSTGRES_BASEBACKUP_WAIT_SECONDS": {
                      "isOptional": true,
                      "description": "Wait for the primary before failing",
                      "defaultValue": "900"
                    }
                  },
                  "volumeMounts": {
                    "09ecc9b5-59b7-4c94-86a3-75cefa45e343": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "ad1e5762-f69e-462f-98e6-75cd63fd482e": {
                  "icon": "https://cdn.jsdelivr.net/gh/pgdogdev/pgdog@main/.github/logo-white.png",
                  "name": "pgdog",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/pgdog-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "8080"
                    },
                    "PGDOG_HOST": {
                      "isOptional": false,
                      "description": "Dual-stack client listener bind",
                      "defaultValue": "[::]"
                    },
                    "PGDOG_PORT": {
                      "isOptional": false,
                      "description": "Client listener port",
                      "defaultValue": "6432"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGDOG_CLIENT_USER}}:${{PGDOG_CLIENT_PASSWORD}}@pgdog.railway.internal:6432/${{PGDOG_DB_NAME}}"
                    },
                    "PGDOG_DB_NAME": {
                      "isOptional": false,
                      "description": "Database name clients connect to",
                      "defaultValue": "railway"
                    },
                    "PGDOG_WORKERS": {
                      "isOptional": true,
                      "description": "Tokio worker threads",
                      "defaultValue": "8"
                    },
                    "PGDOG_CLIENT_USER": {
                      "isOptional": true,
                      "description": "User clients present to PgDog",
                      "defaultValue": "postgres"
                    },
                    "PGDOG_POOLER_MODE": {
                      "isOptional": true,
                      "description": "transaction or session pooling",
                      "defaultValue": "transaction"
                    },
                    "PGDOG_SERVER_USER": {
                      "isOptional": false,
                      "description": "Role PgDog connects as",
                      "defaultValue": "${{postgres.POSTGRES_USER}}"
                    },
                    "PGDOG_PRIMARY_HOST": {
                      "isOptional": false,
                      "description": "Primary private hostname",
                      "defaultValue": "${{postgres.POSTGRES_HOST}}"
                    },
                    "PGDOG_PRIMARY_PORT": {
                      "isOptional": false,
                      "description": "Primary port",
                      "defaultValue": "${{postgres.POSTGRES_PORT}}"
                    },
                    "PGDOG_REPLICA_PORT": {
                      "isOptional": false,
                      "description": "Port for replicas without one",
                      "defaultValue": "5432"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection string",
                      "defaultValue": "postgresql://${{PGDOG_CLIENT_USER}}:${{PGDOG_CLIENT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDOG_DB_NAME}}?sslmode=require"
                    },
                    "PGDOG_MIN_POOL_SIZE": {
                      "isOptional": true,
                      "description": "Warm connections kept open",
                      "defaultValue": "1"
                    },
                    "PGDOG_REPLICA_HOSTS": {
                      "isOptional": true,
                      "description": "Comma-separated replica hosts",
                      "defaultValue": "${{postgres-replica.POSTGRES_HOST}}"
                    },
                    "PGDOG_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Unlocks the admin console database",
                      "defaultValue": "{{PGDOG_ADMIN_PASSWORD}}"
                    },
                    "PGDOG_SERVER_DB_NAME": {
                      "isOptional": false,
                      "description": "Database name on PostgreSQL",
                      "defaultValue": "${{postgres.POSTGRES_DB}}"
                    },
                    "PGDOG_CLIENT_PASSWORD": {
                      "isOptional": false,
                      "description": "Password clients present to PgDog",
                      "defaultValue": "{{PGDOG_CLIENT_PASSWORD}}"
                    },
                    "PGDOG_LSN_CHECK_DELAY": {
                      "isOptional": false,
                      "description": "Enables replication lag monitoring",
                      "defaultValue": "0"
                    },
                    "PGDOG_SERVER_PASSWORD": {
                      "isOptional": false,
                      "description": "Password PgDog connects with",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "PGDOG_CONNECT_ATTEMPTS": {
                      "isOptional": false,
                      "description": "Backend connection retries",
                      "defaultValue": "3"
                    },
                    "PGDOG_HEALTHCHECK_PORT": {
                      "isOptional": false,
                      "description": "HTTP health endpoint port",
                      "defaultValue": "8080"
                    },
                    "PGDOG_OPENMETRICS_HOST": {
                      "isOptional": false,
                      "description": "Metrics listener bind",
                      "defaultValue": "[::]"
                    },
                    "PGDOG_OPENMETRICS_PORT": {
                      "isOptional": false,
                      "description": "Prometheus metrics port",
                      "defaultValue": "9090"
                    },
                    "PGDOG_READ_WRITE_SPLIT": {
                      "isOptional": true,
                      "description": "Reads use replicas and primary",
                      "defaultValue": "include_primary"
                    },
                    "PGDOG_DEFAULT_POOL_SIZE": {
                      "isOptional": true,
                      "description": "Server connections per node",
                      "defaultValue": "25"
                    },
                    "PGDOG_LSN_CHECK_INTERVAL": {
                      "isOptional": false,
                      "description": "Lag check interval in ms",
                      "defaultValue": "5000"
                    },
                    "PGDOG_BAN_REPLICA_LAG_BYTES": {
                      "isOptional": true,
                      "description": "Lag past which reads stop",
                      "defaultValue": "33554432"
                    },
                    "PGDOG_CONNECT_ATTEMPT_DELAY": {
                      "isOptional": false,
                      "description": "Delay between retries in ms",
                      "defaultValue": "2000"
                    },
                    "PGDOG_OPENMETRICS_NAMESPACE": {
                      "isOptional": false,
                      "description": "Metric name prefix",
                      "defaultValue": "pgdog_"
                    },
                    "PGDOG_LOAD_BALANCING_STRATEGY": {
                      "isOptional": true,
                      "description": "Read distribution strategy",
                      "defaultValue": "round_robin"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Health check window",
                      "defaultValue": "300"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6432": {}
                    }
                  }
                },
                "bfa092ff-673c-4bc1-84eb-e1cd74639180": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/postgresql-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "8080"
                    },
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": true,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Direct primary connection string",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@postgres.railway.internal:5432/${{POSTGRES_DB}}"
                    },
                    "LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Server log to stdout, not stderr",
                      "defaultValue": "true"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Private hostname published for peers",
                      "defaultValue": "postgres.railway.internal"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL listener port",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_REPLICATION_SLOT": {
                      "isOptional": false,
                      "description": "Physical slot the standby follows",
                      "defaultValue": "railway_standby"
                    },
                    "POSTGRES_REPLICATION_USER": {
                      "isOptional": false,
                      "description": "Physical replication role",
                      "defaultValue": "replicator"
                    },
                    "POSTGRES_REPLICATION_PASSWORD": {
                      "isOptional": false,
                      "description": "Replication role password",
                      "defaultValue": "{{POSTGRES_REPLICATION_PASSWORD}}"
                    },
                    "POSTGRES_MAX_SLOT_WAL_KEEP_SIZE": {
                      "isOptional": true,
                      "description": "WAL a stalled slot may pin",
                      "defaultValue": "1GB"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Health check window",
                      "defaultValue": "600"
                    }
                  },
                  "volumeMounts": {
                    "bfa092ff-673c-4bc1-84eb-e1cd74639180": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "c7d9b4fd-e001-4bbc-a05d-54fcfe1b649f": {
                  "icon": "https://cdn.jsdelivr.net/gh/sosedoff/pgweb@master/static/img/icon.png",
                  "name": "pgweb",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'exec /usr/bin/pgweb --bind=0.0.0.0 --listen=8081 --skip-open --lock-session --open-retry=60 --open-retry-delay=5 --metrics --metrics-addr=:9090 --metrics-path=/metrics --auth-user=\"$PGWEB_AUTH_USER\" --auth-pass=\"$PGWEB_AUTH_PASS\"'",
                    "healthcheckPath": "/metrics",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "sosedoff/pgweb:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Anonymous metrics listener, health-checked",
                      "defaultValue": "9090"
                    },
                    "PGWEB_AUTH_PASS": {
                      "isOptional": false,
                      "description": "HTTP basic auth password",
                      "defaultValue": "{{PGWEB_AUTH_PASS}}"
                    },
                    "PGWEB_AUTH_USER": {
                      "isOptional": true,
                      "description": "HTTP basic auth username",
                      "defaultValue": "admin"
                    },
                    "PGWEB_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Console connects through PgDog",
                      "defaultValue": "${{pgdog.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8081": {
                        "port": 8081
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "pgweb",
      "method": "GET",
      "path": "/metrics",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T22:14:40.394Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-15T19:26:33.863Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_ae1af4ada118470dbe74",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": false,
        "detail": "got 401, expected 200"
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ]
  }
}
