{
  "manifest_version": "1.0.0",
  "template": {
    "id": "6c988503-d097-45bd-8f66-445e91ef0ad7",
    "slug": "cognee-ai-memory-p-1",
    "name": "Cognee AI Memory Platform with MCP",
    "description": "Cognee 1.5.4 API, MCP over Streamable HTTP, and Postgres + pgvector",
    "url": "https://railway.com/deploy/cognee-ai-memory-p-1",
    "upstream": {
      "repo_url": "https://github.com/RockinPaul/cognee_railway_template"
    }
  },
  "services": [
    {
      "name": "cognee-mcp",
      "source": {
        "repo": "https://github.com/RockinPaul/cognee_railway_template"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "cognee-api",
      "source": {
        "repo": "https://github.com/RockinPaul/cognee_railway_template"
      },
      "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",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "cognee-mcp",
      "description": "Port the MCP server listens on. Must match the public networking target port (8080).",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "API_URL",
      "service": "cognee-mcp",
      "description": "Internal Cognee backend URL used by the MCP service in API mode",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TRANSPORT_MODE",
      "service": "cognee-mcp",
      "description": "Cognee MCP transport for remote clients. In production API mode, exposes the server at /mcp.",
      "secret": false,
      "strategy": "default",
      "default": "http"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "cognee-mcp",
      "description": "Builds the MCP image from Dockerfile.mcp instead of the root Dockerfile, which is the backend API.",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile.mcp"
    },
    {
      "key": "MCP_DISABLE_DNS_REBINDING_PROTECTION",
      "service": "cognee-mcp",
      "description": "Required on Railway, whose healthcheck probes from an internal address.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENV",
      "service": "cognee-api",
      "description": "Application environment label used by the backend service",
      "secret": false,
      "strategy": "default",
      "default": "prod"
    },
    {
      "key": "PORT",
      "service": "cognee-api",
      "description": "Port for the backend API service",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DB_HOST",
      "service": "cognee-api",
      "description": "Private Railway hostname for the relational Postgres connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_NAME",
      "service": "cognee-api",
      "description": "Database name used by Cognee relational storage",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "cognee-api",
      "description": "Port for the relational Postgres connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_MODEL",
      "service": "cognee-api",
      "description": "Reliable default OpenRouter model for Cognify extraction, summarization, and responses. Gemma can still be used as an advanced override.",
      "secret": false,
      "strategy": "default",
      "default": "openrouter/openai/gpt-4o-mini"
    },
    {
      "key": "DB_PASSWORD",
      "service": "cognee-api",
      "description": "Password for the relational Postgres connection",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PROVIDER",
      "service": "cognee-api",
      "description": "Database provider",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "DB_USERNAME",
      "service": "cognee-api",
      "description": "Username for the relational Postgres connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_API_KEY",
      "service": "cognee-api",
      "description": "Your OpenRouter API key. Cognee uses it for the OpenRouter LLM and, by default, for embeddings too.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LLM_ENDPOINT",
      "service": "cognee-api",
      "description": "OpenRouter OpenAI-compatible API base URL for chat/completions",
      "secret": false,
      "strategy": "default",
      "default": "https://openrouter.ai/api/v1"
    },
    {
      "key": "LLM_PROVIDER",
      "service": "cognee-api",
      "description": "Cognee LLM provider for OpenRouter's OpenAI-compatible API",
      "secret": false,
      "strategy": "default",
      "default": "custom"
    },
    {
      "key": "VECTOR_DB_URL",
      "service": "cognee-api",
      "description": "Connection URL for pgvector-backed vector storage",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_DB_HOST",
      "service": "cognee-api",
      "description": "Private Railway hostname for the pgvector connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_DB_NAME",
      "service": "cognee-api",
      "description": "Postgres database for pgvector storage. Same database as DB_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_DB_PORT",
      "service": "cognee-api",
      "description": "Port for the pgvector connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EMBEDDING_MODEL",
      "service": "cognee-api",
      "description": "OpenRouter embedding model. 3072 dimensions. Changing it later invalidates stored vectors.",
      "secret": false,
      "strategy": "default",
      "default": "openrouter/openai/text-embedding-3-large"
    },
    {
      "key": "EMBEDDING_API_KEY",
      "service": "cognee-api",
      "description": "OpenRouter key for embeddings. Defaults to your LLM key; override only if you use a separate key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EMBEDDING_ENDPOINT",
      "service": "cognee-api",
      "description": "OpenRouter OpenAI-compatible API base URL for embeddings",
      "secret": false,
      "strategy": "default",
      "default": "https://openrouter.ai/api/v1"
    },
    {
      "key": "EMBEDDING_PROVIDER",
      "service": "cognee-api",
      "description": "Embedding provider for semantic indexing",
      "secret": false,
      "strategy": "default",
      "default": "litellm"
    },
    {
      "key": "GRAPH_DATABASE_URL",
      "service": "cognee-api",
      "description": "Postgres connection string for graph persistence in single-user mode",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_DB_PASSWORD",
      "service": "cognee-api",
      "description": "Password for the pgvector connection",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VECTOR_DB_PROVIDER",
      "service": "cognee-api",
      "description": "Vector database provider",
      "secret": false,
      "strategy": "default",
      "default": "pgvector"
    },
    {
      "key": "VECTOR_DB_USERNAME",
      "service": "cognee-api",
      "description": "Username for the pgvector connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRAPH_DATABASE_HOST",
      "service": "cognee-api",
      "description": "Private Railway hostname for the graph Postgres connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRAPH_DATABASE_NAME",
      "service": "cognee-api",
      "description": "Postgres database for graph storage. Same database as DB_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRAPH_DATABASE_PORT",
      "service": "cognee-api",
      "description": "Port for graph persistence in Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_INSTRUCTOR_MODE",
      "service": "cognee-api",
      "description": "Structured-output mode for the OpenRouter-backed LLM adapter",
      "secret": false,
      "strategy": "default",
      "default": "json_schema_mode"
    },
    {
      "key": "CORS_ALLOWED_ORIGINS",
      "service": "cognee-api",
      "description": "Comma-separated allowed CORS origins",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "EMBEDDING_DIMENSIONS",
      "service": "cognee-api",
      "description": "Embedding vector dimensions for Gemini Embedding 2 Preview",
      "secret": false,
      "strategy": "default",
      "default": "3072"
    },
    {
      "key": "REQUIRE_AUTHENTICATION",
      "service": "cognee-api",
      "description": "Disable API auth for a single-user MCP-backed deployment",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "GRAPH_DATABASE_PASSWORD",
      "service": "cognee-api",
      "description": "Password for the graph Postgres connection",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRAPH_DATABASE_PROVIDER",
      "service": "cognee-api",
      "description": "Graph database provider for single-user deployments",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "GRAPH_DATABASE_USERNAME",
      "service": "cognee-api",
      "description": "Username for the graph Postgres connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENABLE_BACKEND_ACCESS_CONTROL",
      "service": "cognee-api",
      "description": "Disable multi-user dataset isolation for a simpler single-user memory deployment",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "VECTOR_DATASET_DATABASE_HANDLER",
      "service": "cognee-api",
      "description": "Dataset handler aligned with the pgvector backend",
      "secret": false,
      "strategy": "default",
      "default": "pgvector"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Filesystem path inside the Postgres container where the database cluster is stored.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private Railway hostname for connecting to the Postgres service from other Railway services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port exposed by the Postgres service, typically 5432.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Primary PostgreSQL username used by clients to connect to the database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default PostgreSQL database name created for the service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for the PostgreSQL user used by clients to connect to the database.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name initialized by the Postgres service on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private/internal PostgreSQL connection URL for service-to-service traffic inside Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Primary PostgreSQL user created during service initialization.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Number of days the generated SSL certificate should remain valid.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Initial password for the PostgreSQL user, typically generated as a Railway secret.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public PostgreSQL connection URL using Railway's TCP proxy, intended for access from outside Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "How many seconds Railway allows the old deployment to drain before termination.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "cognee-ai-memory-p-1"
      }
    },
    "cli": "railway deploy --template cognee-ai-memory-p-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "6c988503-d097-45bd-8f66-445e91ef0ad7",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "12d0768e-ecae-4d4f-bb3c-3b331305e718": {
                  "icon": "https://avatars.githubusercontent.com/u/182288589?s=200&v=4.png",
                  "name": "cognee-mcp",
                  "deploy": {
                    "healthcheckPath": "/health"
                  },
                  "source": {
                    "repo": "RockinPaul/cognee_railway_template",
                    "branch": "main",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the MCP server listens on. Must match the public networking target port (8080).",
                      "defaultValue": "8080"
                    },
                    "API_URL": {
                      "description": "Internal Cognee backend URL used by the MCP service in API mode",
                      "defaultValue": "http://${{cognee-api.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "TRANSPORT_MODE": {
                      "description": "Cognee MCP transport for remote clients. In production API mode, exposes the server at /mcp.",
                      "defaultValue": "http"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Builds the MCP image from Dockerfile.mcp instead of the root Dockerfile, which is the backend API.",
                      "defaultValue": "Dockerfile.mcp"
                    },
                    "MCP_DISABLE_DNS_REBINDING_PROTECTION": {
                      "isOptional": false,
                      "description": "Required on Railway, whose healthcheck probes from an internal address.",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "6da05777-1f9e-4711-ab53-7be95980ba12": {
                  "icon": "https://avatars.githubusercontent.com/u/125468716?s=48&v=4.png",
                  "name": "cognee-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/RockinPaul/cognee_railway_template",
                    "rootDirectory": null
                  },
                  "variables": {
                    "ENV": {
                      "description": "Application environment label used by the backend service",
                      "defaultValue": "prod"
                    },
                    "PORT": {
                      "description": "Port for the backend API service",
                      "defaultValue": "8080"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname for the relational Postgres connection",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "Database name used by Cognee relational storage",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "Port for the relational Postgres connection",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "LLM_MODEL": {
                      "isOptional": false,
                      "description": "Reliable default OpenRouter model for Cognify extraction, summarization, and responses. Gemma can still be used as an advanced override.",
                      "defaultValue": "openrouter/openai/gpt-4o-mini"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the relational Postgres connection",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DB_PROVIDER": {
                      "isOptional": false,
                      "description": "Database provider",
                      "defaultValue": "postgres"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the relational Postgres connection",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "LLM_API_KEY": {
                      "isOptional": false,
                      "description": "Your OpenRouter API key. Cognee uses it for the OpenRouter LLM and, by default, for embeddings too.",
                      "defaultValue": "{{LLM_API_KEY}}"
                    },
                    "LLM_ENDPOINT": {
                      "isOptional": false,
                      "description": "OpenRouter OpenAI-compatible API base URL for chat/completions",
                      "defaultValue": "https://openrouter.ai/api/v1"
                    },
                    "LLM_PROVIDER": {
                      "isOptional": false,
                      "description": "Cognee LLM provider for OpenRouter's OpenAI-compatible API",
                      "defaultValue": "custom"
                    },
                    "VECTOR_DB_URL": {
                      "isOptional": false,
                      "description": "Connection URL for pgvector-backed vector storage",
                      "defaultValue": "postgresql://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}}"
                    },
                    "VECTOR_DB_HOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname for the pgvector connection",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "VECTOR_DB_NAME": {
                      "isOptional": false,
                      "description": "Postgres database for pgvector storage. Same database as DB_NAME.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "VECTOR_DB_PORT": {
                      "isOptional": false,
                      "description": "Port for the pgvector connection",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "EMBEDDING_MODEL": {
                      "isOptional": false,
                      "description": "OpenRouter embedding model. 3072 dimensions. Changing it later invalidates stored vectors.",
                      "defaultValue": "openrouter/openai/text-embedding-3-large"
                    },
                    "EMBEDDING_API_KEY": {
                      "isOptional": false,
                      "description": "OpenRouter key for embeddings. Defaults to your LLM key; override only if you use a separate key.",
                      "defaultValue": "${{LLM_API_KEY}}"
                    },
                    "EMBEDDING_ENDPOINT": {
                      "isOptional": false,
                      "description": "OpenRouter OpenAI-compatible API base URL for embeddings",
                      "defaultValue": "https://openrouter.ai/api/v1"
                    },
                    "EMBEDDING_PROVIDER": {
                      "isOptional": false,
                      "description": "Embedding provider for semantic indexing",
                      "defaultValue": "litellm"
                    },
                    "GRAPH_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string for graph persistence in single-user mode",
                      "defaultValue": "postgresql+asyncpg://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}}"
                    },
                    "VECTOR_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the pgvector connection",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "VECTOR_DB_PROVIDER": {
                      "isOptional": false,
                      "description": "Vector database provider",
                      "defaultValue": "pgvector"
                    },
                    "VECTOR_DB_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the pgvector connection",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "GRAPH_DATABASE_HOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname for the graph Postgres connection",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "GRAPH_DATABASE_NAME": {
                      "isOptional": false,
                      "description": "Postgres database for graph storage. Same database as DB_NAME.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "GRAPH_DATABASE_PORT": {
                      "isOptional": false,
                      "description": "Port for graph persistence in Postgres",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "LLM_INSTRUCTOR_MODE": {
                      "isOptional": false,
                      "description": "Structured-output mode for the OpenRouter-backed LLM adapter",
                      "defaultValue": "json_schema_mode"
                    },
                    "CORS_ALLOWED_ORIGINS": {
                      "description": "Comma-separated allowed CORS origins",
                      "defaultValue": "*"
                    },
                    "EMBEDDING_DIMENSIONS": {
                      "isOptional": false,
                      "description": "Embedding vector dimensions for Gemini Embedding 2 Preview",
                      "defaultValue": "3072"
                    },
                    "REQUIRE_AUTHENTICATION": {
                      "isOptional": false,
                      "description": "Disable API auth for a single-user MCP-backed deployment",
                      "defaultValue": "false"
                    },
                    "GRAPH_DATABASE_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the graph Postgres connection",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "GRAPH_DATABASE_PROVIDER": {
                      "isOptional": false,
                      "description": "Graph database provider for single-user deployments",
                      "defaultValue": "postgres"
                    },
                    "GRAPH_DATABASE_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the graph Postgres connection",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "ENABLE_BACKEND_ACCESS_CONTROL": {
                      "isOptional": false,
                      "description": "Disable multi-user dataset isolation for a simpler single-user memory deployment",
                      "defaultValue": "false"
                    },
                    "VECTOR_DATASET_DATABASE_HANDLER": {
                      "isOptional": false,
                      "description": "Dataset handler aligned with the pgvector backend",
                      "defaultValue": "pgvector"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "d73b627e-4b3d-4c8d-b7b6-530fee545064": {
                  "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:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Filesystem path inside the Postgres container where the database cluster is stored.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname for connecting to the Postgres service from other Railway services.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port exposed by the Postgres service, typically 5432.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Primary PostgreSQL username used by clients to connect to the database.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default PostgreSQL database name created for the service.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the PostgreSQL user used by clients to connect to the database.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name initialized by the Postgres service on first boot.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private/internal PostgreSQL connection URL for service-to-service traffic inside Railway.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Primary PostgreSQL user created during service initialization.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Number of days the generated SSL certificate should remain valid.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Initial password for the PostgreSQL user, typically generated as a Railway secret.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public PostgreSQL connection URL using Railway's TCP proxy, intended for access from outside Railway.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "How many seconds Railway allows the old deployment to drain before termination.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "d73b627e-4b3d-4c8d-b7b6-530fee545064": {
                      "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": "cognee-mcp",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T10:14:42.516Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T13:49:24.030Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1eae64e645884487a611",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 155,
    "typical_build_seconds": 40,
    "typical_start_seconds": 46,
    "slowest_service": "cognee-mcp"
  }
}
