{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2da1f8d5-b749-470e-aa87-24ddcdfc480b",
    "slug": "pbi-gateway",
    "name": "PBI Gateway",
    "description": "Power BI Gateway con Statdeck Geo · más conectores en statdeck.lat",
    "url": "https://railway.com/deploy/pbi-gateway",
    "upstream": {
      "repo_url": "https://github.com/Kennethguerra3/PBI-Gateway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "PBI-Gateway",
      "source": {
        "repo": "https://github.com/Kennethguerra3/PBI-Gateway"
      },
      "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",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "PBI-Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "PGDATA",
      "service": "PBI-Gateway",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "PBI-Gateway",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "PBI-Gateway",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "PBI-Gateway",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NODE_ENV",
      "service": "PBI-Gateway",
      "description": "Provide a value for NODE_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "LOG_LEVEL",
      "service": "PBI-Gateway",
      "description": "Provide a value for LOG_LEVEL.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "PGDATABASE",
      "service": "PBI-Gateway",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "PBI-Gateway",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "PBI-Gateway",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "PBI-Gateway",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_NAME",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_NAME.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "GATEWAY_USER",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_USER.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MAPBOX_TOKEN",
      "service": "PBI-Gateway",
      "description": "Provide a value for MAPBOX_TOKEN.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_USER",
      "service": "PBI-Gateway",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "PBI-Gateway",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "SQLSERVER_HOST",
      "service": "PBI-Gateway",
      "description": "Provide a value for SQLSERVER_HOST.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SQLSERVER_PORT",
      "service": "PBI-Gateway",
      "description": "Provide a value for SQLSERVER_PORT.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SQLSERVER_USER",
      "service": "PBI-Gateway",
      "description": "Provide a value for SQLSERVER_USER.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "COMPRESSION_LEVEL",
      "service": "PBI-Gateway",
      "description": "Provide a value for COMPRESSION_LEVEL.",
      "secret": false,
      "strategy": "default",
      "default": "6"
    },
    {
      "key": "GATEWAY_MAX_LIMIT",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_MAX_LIMIT.",
      "secret": false,
      "strategy": "default",
      "default": "500000"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "PBI-Gateway",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RATE_LIMIT_WINDOW",
      "service": "PBI-Gateway",
      "description": "Provide a value for RATE_LIMIT_WINDOW.",
      "secret": false,
      "strategy": "default",
      "default": "15"
    },
    {
      "key": "SQLSERVER_PASSWORD",
      "service": "PBI-Gateway",
      "description": "Provide a value for SQLSERVER_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "PBI-Gateway",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GATEWAY_MAX_RETRIES",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_MAX_RETRIES.",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "GATEWAY_RETRY_DELAY",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_RETRY_DELAY.",
      "secret": false,
      "strategy": "default",
      "default": "2000"
    },
    {
      "key": "GATEWAY_RECOVERY_KEY",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_RECOVERY_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "COMPRESSION_THRESHOLD",
      "service": "PBI-Gateway",
      "description": "Provide a value for COMPRESSION_THRESHOLD.",
      "secret": false,
      "strategy": "default",
      "default": "1024"
    },
    {
      "key": "RATE_LIMIT_MAX_REQUESTS",
      "service": "PBI-Gateway",
      "description": "Provide a value for RATE_LIMIT_MAX_REQUESTS.",
      "secret": false,
      "strategy": "default",
      "default": "100"
    },
    {
      "key": "SQLSERVER_QUERY_TIMEOUT",
      "service": "PBI-Gateway",
      "description": "Provide a value for SQLSERVER_QUERY_TIMEOUT.",
      "secret": false,
      "strategy": "default",
      "default": "120000"
    },
    {
      "key": "GATEWAY_AUTO_STREAM_THRESHOLD",
      "service": "PBI-Gateway",
      "description": "Provide a value for GATEWAY_AUTO_STREAM_THRESHOLD.",
      "secret": false,
      "strategy": "default",
      "default": "25000"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "PBI-Gateway",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pbi-gateway"
      }
    },
    "cli": "railway deploy --template pbi-gateway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2da1f8d5-b749-470e-aa87-24ddcdfc480b",
            "serializedConfig": {
              "services": {
                "3e1fd23d-8543-46a8-959d-772ece6ee440": {
                  "name": "PBI-Gateway",
                  "source": {
                    "repo": "Kennethguerra3/PBI-Gateway",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "defaultValue": "3000"
                    },
                    "PGDATA": {
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "NODE_ENV": {
                      "defaultValue": "production"
                    },
                    "LOG_LEVEL": {
                      "defaultValue": "info"
                    },
                    "PGDATABASE": {
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "GATEWAY_NAME": {
                      "isOptional": false,
                      "defaultValue": "{{GATEWAY_NAME}}"
                    },
                    "GATEWAY_USER": {
                      "isOptional": false,
                      "defaultValue": "{{GATEWAY_USER}}"
                    },
                    "MAPBOX_TOKEN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{MAPBOX_TOKEN}}"
                    },
                    "POSTGRES_USER": {
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "SQLSERVER_HOST": {
                      "isOptional": false,
                      "defaultValue": "{{SQLSERVER_HOST}}"
                    },
                    "SQLSERVER_PORT": {
                      "isOptional": false,
                      "defaultValue": "{{SQLSERVER_PORT}}"
                    },
                    "SQLSERVER_USER": {
                      "isOptional": false,
                      "defaultValue": "{{SQLSERVER_USER}}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "COMPRESSION_LEVEL": {
                      "defaultValue": "6"
                    },
                    "GATEWAY_MAX_LIMIT": {
                      "defaultValue": "500000"
                    },
                    "POSTGRES_PASSWORD": {
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RATE_LIMIT_WINDOW": {
                      "defaultValue": "15"
                    },
                    "SQLSERVER_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{SQLSERVER_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "GATEWAY_MAX_RETRIES": {
                      "defaultValue": "3"
                    },
                    "GATEWAY_RETRY_DELAY": {
                      "defaultValue": "2000"
                    },
                    "GATEWAY_RECOVERY_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{GATEWAY_RECOVERY_KEY}}"
                    },
                    "COMPRESSION_THRESHOLD": {
                      "defaultValue": "1024"
                    },
                    "RATE_LIMIT_MAX_REQUESTS": {
                      "defaultValue": "100"
                    },
                    "SQLSERVER_QUERY_TIMEOUT": {
                      "defaultValue": "120000"
                    },
                    "GATEWAY_AUTO_STREAM_THRESHOLD": {
                      "defaultValue": "25000"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "f4aa9355-315a-4ed8-853b-14d2863820cb": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "f4aa9355-315a-4ed8-853b-14d2863820cb": {
                      "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-10T10:14:45.332Z",
  "generator_version": "0.1.0"
}
