{
  "manifest_version": "1.0.0",
  "template": {
    "id": "99e9f621-1dae-465a-bd09-27bb7e916dae",
    "slug": "openmonetize",
    "name": "OpenMonetize",
    "description": "Open-source AI usage metering and billing platform.",
    "url": "https://railway.com/deploy/openmonetize",
    "upstream": {
      "repo_url": "https://github.com/openmonetize/openmonetize"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "API Gateway",
      "source": {
        "repo": "https://github.com/openmonetize/openmonetize"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Rating Engine",
      "source": {
        "repo": "https://github.com/openmonetize/openmonetize"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Dashboard",
      "source": {
        "repo": "https://github.com/openmonetize/openmonetize"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Ingestion Service",
      "source": {
        "repo": "https://github.com/openmonetize/openmonetize"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "HOST",
      "service": "API Gateway",
      "description": "The host the API Gateway binds to",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PORT",
      "service": "API Gateway",
      "description": "The port the API Gateway listens on",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "NODE_ENV",
      "service": "API Gateway",
      "description": "NODE_ENV of the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "API Gateway",
      "description": "The connection string for Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "API Gateway",
      "description": "The connection string for the PostgreSQL database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RATE_LIMIT_MAX",
      "service": "API Gateway",
      "description": "Maximum number of requests per window",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PUBLIC_DOCS_URL",
      "service": "API Gateway",
      "description": "URL to public documentation",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RATE_LIMIT_WINDOW",
      "service": "API Gateway",
      "description": "Time window for rate limiting (e.g. '1 minute')",
      "secret": false,
      "strategy": "default",
      "default": "1 minute"
    },
    {
      "key": "RATING_SERVICE_URL",
      "service": "API Gateway",
      "description": "The internal URL of the Rating Engine",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INGESTION_SERVICE_URL",
      "service": "API Gateway",
      "description": "The internal URL of the Ingestion Service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "HOST",
      "service": "Rating Engine",
      "description": "he host the Rating Engine binds to",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "PORT",
      "service": "Rating Engine",
      "description": "The port the Dashboard listens on",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "NODE_ENV",
      "service": "Rating Engine",
      "description": "Node environment",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Rating Engine",
      "description": "Logging level (debug, info, warn, error)",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "REDIS_URL",
      "service": "Rating Engine",
      "description": "The connection string for Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Rating Engine",
      "description": "The connection string for the PostgreSQL database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "Dashboard",
      "description": "Secret used to encrypt session data",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GOOGLE_CLIENT_ID",
      "service": "Dashboard",
      "description": "Google OAuth Client I",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "NEXT_PUBLIC_API_URL",
      "service": "Dashboard",
      "description": "The public URL of the API Gateway",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "GOOGLE_CLIENT_SECRET",
      "service": "Dashboard",
      "description": "Google OAuth Client Secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HOST",
      "service": "Ingestion Service",
      "description": "The host the API Gateway binds to",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "PORT",
      "service": "Ingestion Service",
      "description": "The port the Ingestion Service listens on",
      "secret": false,
      "strategy": "default",
      "default": "3002"
    },
    {
      "key": "NODE_ENV",
      "service": "Ingestion Service",
      "description": "Running environment",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "Ingestion Service",
      "description": "The connection string for Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "QUEUE_NAME",
      "service": "Ingestion Service",
      "description": "Name of the Redis queue for usage events",
      "secret": false,
      "strategy": "default",
      "default": "usage-events"
    },
    {
      "key": "DATABASE_URL",
      "service": "Ingestion Service",
      "description": "The connection string for the PostgreSQL database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RATE_LIMIT_MAX",
      "service": "Ingestion Service",
      "description": "Maximum number of requests per window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "QUEUE_CONCURRENCY",
      "service": "Ingestion Service",
      "description": "Number of concurrent queue consumers",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "RATE_LIMIT_WINDOW_MS",
      "service": "Ingestion Service",
      "description": "Time window for rate limiting in milliseconds",
      "secret": false,
      "strategy": "default",
      "default": "60000"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "The Redis password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "The port Redis listens on",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "The Redis user",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "The connection string for Redis",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "The Redis password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Provide a value for REDIS_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "The directory where PostgreSQL stores data",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Provide a value for PGHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Provide a value for PGPORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Provide a value for PGUSER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Provide a value for PGDATABASE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Provide a value for PGPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "The PostgreSQL database name",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time to wait for connections to drain during deployment",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "openmonetize"
      }
    },
    "cli": "railway deploy --template openmonetize",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "99e9f621-1dae-465a-bd09-27bb7e916dae",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1a6084e1-33de-4072-a779-f4cb347c52c8": {
                  "icon": "https://i.imgur.com/yEl7v03.jpeg",
                  "name": "API Gateway",
                  "deploy": {
                    "startCommand": "npm run start:api",
                    "healthcheckPath": "/health",
                    "preDeployCommand": [
                      "pnpm db:seed"
                    ],
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 1
                  },
                  "source": {
                    "repo": "https://github.com/openmonetize/openmonetize",
                    "rootDirectory": "/platform"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "The host the API Gateway binds to",
                      "defaultValue": "{{HOST}}"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "The port the API Gateway listens on",
                      "defaultValue": "{{PORT}}"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "NODE_ENV of the project",
                      "defaultValue": "${{shared.NODE_ENV}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The connection string for Redis",
                      "defaultValue": "${{shared.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "The connection string for the PostgreSQL database",
                      "defaultValue": "${{shared.DATABASE_URL}}"
                    },
                    "RATE_LIMIT_MAX": {
                      "isOptional": false,
                      "description": "Maximum number of requests per window",
                      "defaultValue": "{{RATE_LIMIT_MAX}}"
                    },
                    "PUBLIC_DOCS_URL": {
                      "isOptional": false,
                      "description": "URL to public documentation",
                      "defaultValue": "{{PUBLIC_DOCS_URL}}"
                    },
                    "RATE_LIMIT_WINDOW": {
                      "isOptional": false,
                      "description": "Time window for rate limiting (e.g. '1 minute')",
                      "defaultValue": "1 minute"
                    },
                    "RATING_SERVICE_URL": {
                      "isOptional": false,
                      "description": "The internal URL of the Rating Engine",
                      "defaultValue": "http://${{rating-engine.HOST}}:${{rating-engine.PORT}}"
                    },
                    "INGESTION_SERVICE_URL": {
                      "isOptional": false,
                      "description": "The internal URL of the Ingestion Service",
                      "defaultValue": "http://${{ingestion-service.HOST}}:${{ingestion-service.PORT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "3aa52330-77ea-457a-82be-5798172f597b": {
                  "icon": "https://i.imgur.com/yEl7v03.jpeg",
                  "name": "Rating Engine",
                  "deploy": {
                    "startCommand": "npm run start:rating",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 1
                  },
                  "source": {
                    "repo": "https://github.com/openmonetize/openmonetize",
                    "rootDirectory": "/platform"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "he host the Rating Engine binds to",
                      "defaultValue": "0.0.0.0"
                    },
                    "PORT": {
                      "isOptional": true,
                      "description": "The port the Dashboard listens on",
                      "defaultValue": "3000"
                    },
                    "NODE_ENV": {
                      "isOptional": true,
                      "description": "Node environment",
                      "defaultValue": "${{shared.NODE_ENV}}"
                    },
                    "LOG_LEVEL": {
                      "isOptional": true,
                      "description": "Logging level (debug, info, warn, error)",
                      "defaultValue": "info"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The connection string for Redis",
                      "defaultValue": "${{shared.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "The connection string for the PostgreSQL database",
                      "defaultValue": "${{shared.DATABASE_URL}}"
                    }
                  }
                },
                "8f591562-741a-4216-831c-c9424da3a84e": {
                  "icon": "https://i.imgur.com/yEl7v03.jpeg",
                  "name": "Dashboard",
                  "deploy": {
                    "startCommand": "npm start --workspace=dashboard",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/openmonetize/openmonetize",
                    "rootDirectory": "platform"
                  },
                  "variables": {
                    "NEXTAUTH_SECRET": {
                      "isOptional": false,
                      "description": "Secret used to encrypt session data",
                      "defaultValue": "{{NEXTAUTH_SECRET}}"
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": false,
                      "description": "Google OAuth Client I",
                      "defaultValue": "{{GOOGLE_CLIENT_ID}}"
                    },
                    "NEXT_PUBLIC_API_URL": {
                      "isOptional": false,
                      "description": "The public URL of the API Gateway",
                      "defaultValue": "{{NEXT_PUBLIC_API_URL}}"
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": false,
                      "description": "Google OAuth Client Secret",
                      "defaultValue": "{{GOOGLE_CLIENT_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "a709dd02-99bf-4260-abe3-b9597a2eee10": {
                  "icon": "https://i.imgur.com/yEl7v03.jpeg",
                  "name": "Ingestion Service",
                  "deploy": {
                    "startCommand": "npm run start:ingestion",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 1
                  },
                  "source": {
                    "repo": "https://github.com/openmonetize/openmonetize",
                    "rootDirectory": "/platform"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "The host the API Gateway binds to",
                      "defaultValue": "0.0.0.0"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "The port the Ingestion Service listens on",
                      "defaultValue": "3002"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Running environment",
                      "defaultValue": "${{shared.NODE_ENV}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The connection string for Redis",
                      "defaultValue": "${{shared.REDIS_URL}}"
                    },
                    "QUEUE_NAME": {
                      "isOptional": true,
                      "description": "Name of the Redis queue for usage events",
                      "defaultValue": "usage-events"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "The connection string for the PostgreSQL database",
                      "defaultValue": "${{shared.DATABASE_URL}}"
                    },
                    "RATE_LIMIT_MAX": {
                      "isOptional": true,
                      "description": "Maximum number of requests per window",
                      "defaultValue": "60"
                    },
                    "QUEUE_CONCURRENCY": {
                      "isOptional": true,
                      "description": "Number of concurrent queue consumers",
                      "defaultValue": "10"
                    },
                    "RATE_LIMIT_WINDOW_MS": {
                      "isOptional": true,
                      "description": "Time window for rate limiting in milliseconds",
                      "defaultValue": "60000"
                    }
                  }
                },
                "d7991a37-6f40-4c23-8284-cf05983cabef": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "The Redis password",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "The port Redis listens on",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "The Redis user",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The connection string for Redis",
                      "defaultValue": "redis://:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "The Redis password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "d7991a37-6f40-4c23-8284-cf05983cabef": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "e59314e2-6a05-4f4e-ae15-476e68675255": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "The directory where PostgreSQL stores data",
                      "defaultValue": "/var/lib/postgresql/data"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "The PostgreSQL database name",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time to wait for connections to drain during deployment",
                      "defaultValue": "30"
                    }
                  },
                  "volumeMounts": {
                    "e59314e2-6a05-4f4e-ae15-476e68675255": {
                      "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": {
    "healthcheck": {
      "service": "API Gateway",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 6,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0"
}
