{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dc6039c0-5b38-48c1-b81d-3578b8e7b018",
    "slug": "auto-ontology-v1-semantic-layer-for-ai-a",
    "name": "Nvidia Auto Ontology v1 Semantic Layer for AI Agents",
    "description": "Semantic layer and NL-to-SQL for AI agents: MCP server, API and web UI.",
    "url": "https://railway.com/deploy/auto-ontology-v1-semantic-layer-for-ai-a",
    "upstream": {
      "repo_url": "https://github.com/baranberkay96/auto-ontology-railway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Backend",
      "source": {
        "repo": "https://github.com/baranberkay96/auto-ontology-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Ingestion",
      "source": {
        "repo": "https://github.com/baranberkay96/auto-ontology-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Sample Data",
      "source": {
        "repo": "https://github.com/baranberkay96/auto-ontology-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "MCP Server",
      "source": {
        "repo": "https://github.com/baranberkay96/auto-ontology-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Frontend",
      "source": {
        "repo": "https://github.com/baranberkay96/auto-ontology-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Backend",
      "description": "Port Railway health-checks (the API server always listens on 0.0.0.0:3001). Never add a public domain: this service trusts the x-auto-ontology-user-id header from the Frontend.",
      "secret": false,
      "strategy": "default",
      "default": "3001"
    },
    {
      "key": "APP_VERSION",
      "service": "Backend",
      "description": "Version shown in logs (matches the pinned image).",
      "secret": false,
      "strategy": "default",
      "default": "1.1.0"
    },
    {
      "key": "EMBED_MODEL",
      "service": "Backend",
      "description": "Embedding model (upstream default; the vector table is created for 2048 dimensions).",
      "secret": false,
      "strategy": "default",
      "default": "nvidia/nemotron-3-embed-1b"
    },
    {
      "key": "RERANK_MODEL",
      "service": "Backend",
      "description": "Reranking model (upstream default).",
      "secret": false,
      "strategy": "default",
      "default": "nvidia/llama-nemotron-rerank-vl-1b-v2"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "Backend",
      "description": "Postgres private host (pgvector database for the catalog, auth tables and embeddings).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "Backend",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Backend",
      "description": "Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EMBED_ENDPOINT",
      "service": "Backend",
      "description": "Embedding endpoint (NVIDIA NIM API). Ingest and query must use the same model; changing it needs a re-ingest.",
      "secret": false,
      "strategy": "default",
      "default": "https://integrate.api.nvidia.com/v1"
    },
    {
      "key": "OMP_NUM_THREADS",
      "service": "Backend",
      "description": "Caps native thread pools (numpy, onnxruntime) to the service's CPU share instead of the host's core count.",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "REASONING_MODEL",
      "service": "Backend",
      "description": "Main chat / NL-to-SQL model (upstream default).",
      "secret": false,
      "strategy": "default",
      "default": "nvidia/nemotron-3-ultra-550b-a55b"
    },
    {
      "key": "RERANK_ENDPOINT",
      "service": "Backend",
      "description": "Reranking endpoint (NVIDIA NIM reranking API).",
      "secret": false,
      "strategy": "default",
      "default": "https://ai.api.nvidia.com/v1/retrieval/nvidia/llama-nemotron-rerank-vl-1b-v2/reranking"
    },
    {
      "key": "LLM_MAX_INFLIGHT",
      "service": "Backend",
      "description": "Max concurrent model requests per process (0 = unbounded). 6 stays under the hosted endpoint's per-key concurrency; lower it if you see HTTP 429/503.",
      "secret": false,
      "strategy": "default",
      "default": "6"
    },
    {
      "key": "POSTGRES_DATABASE",
      "service": "Backend",
      "description": "Database holding the public (Alembic), frontend (Prisma) and vdb (pgvector) schemas.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Backend",
      "description": "Postgres password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REASONING_ENDPOINT",
      "service": "Backend",
      "description": "Main chat / NL-to-SQL model endpoint. Any OpenAI-compatible chat endpoint works; set REASONING_API_KEY for another provider.",
      "secret": false,
      "strategy": "default",
      "default": "https://integrate.api.nvidia.com/v1"
    },
    {
      "key": "AUTO_ONTOLOGY_IMAGE",
      "service": "Backend",
      "description": "NVIDIA's the backend + ingestion image this service's Docker build starts FROM (Railway passes it as a build argument). Upgrade all Auto Ontology services together.",
      "secret": false,
      "strategy": "default",
      "default": "nvcr.io/nvidia/auto-ontology:1.1.0@sha256:d6d50ee5fb3617dce218ea9706e737c181e3eb6afcaf15cd954364a341aef57b"
    },
    {
      "key": "NON_REASONING_MODEL",
      "service": "Backend",
      "description": "Lighter model (upstream default).",
      "secret": false,
      "strategy": "default",
      "default": "nvidia/nemotron-3-ultra-550b-a55b"
    },
    {
      "key": "DEFAULT_MODELS_MODEL",
      "service": "Backend",
      "description": "Shared default model for any model field left unset (upstream default).",
      "secret": false,
      "strategy": "default",
      "default": "nvidia/nemotron-3-ultra-550b-a55b"
    },
    {
      "key": "LLM_INVOKE_TIMEOUT_S",
      "service": "Backend",
      "description": "Timeout per model call, in seconds.",
      "secret": false,
      "strategy": "default",
      "default": "120"
    },
    {
      "key": "INGESTION_SERVICE_URL",
      "service": "Backend",
      "description": "Ingestion service on the private network (ingest and semantic compilation triggers).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DEFAULT_MODELS_API_KEY",
      "service": "Backend",
      "description": "Required. NVIDIA API key (nvapi-...), free from build.nvidia.com; used by every model below unless REASONING_API_KEY, NON_REASONING_API_KEY, EMBED_API_KEY or RERANK_API_KEY is set. Hosted endpoints are governed by NVIDIA's API trial terms.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NON_REASONING_ENDPOINT",
      "service": "Backend",
      "description": "Lighter model endpoint (entity extraction). OpenAI-compatible; set NON_REASONING_API_KEY for another provider.",
      "secret": false,
      "strategy": "default",
      "default": "https://integrate.api.nvidia.com/v1"
    },
    {
      "key": "DEFAULT_MODELS_ENDPOINT",
      "service": "Backend",
      "description": "Shared default endpoint (OpenAI-compatible) for any model field left unset.",
      "secret": false,
      "strategy": "default",
      "default": "https://integrate.api.nvidia.com/v1"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Backend",
      "description": "Seconds between SIGTERM and SIGKILL on redeploy (lets running chat turns finish).",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "Ingestion",
      "description": "Port Railway health-checks.",
      "secret": false,
      "strategy": "default",
      "default": "3002"
    },
    {
      "key": "APP_VERSION",
      "service": "Ingestion",
      "description": "Version shown in logs (matches the pinned image).",
      "secret": false,
      "strategy": "default",
      "default": "1.1.0"
    },
    {
      "key": "EMBED_MODEL",
      "service": "Ingestion",
      "description": "Same as EMBED_MODEL on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RERANK_MODEL",
      "service": "Ingestion",
      "description": "Same as RERANK_MODEL on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "Ingestion",
      "description": "Postgres private host (pgvector database for the catalog, auth tables and embeddings).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "Ingestion",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Ingestion",
      "description": "Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "EMBED_ENDPOINT",
      "service": "Ingestion",
      "description": "Same as EMBED_ENDPOINT on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "INGESTION_PORT",
      "service": "Ingestion",
      "description": "Port the ingestion service listens on (0.0.0.0, private network only).",
      "secret": false,
      "strategy": "default",
      "default": "3002"
    },
    {
      "key": "OMP_NUM_THREADS",
      "service": "Ingestion",
      "description": "Caps native thread pools (numpy, onnxruntime) to the service's CPU share instead of the host's core count.",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "REASONING_MODEL",
      "service": "Ingestion",
      "description": "Same as REASONING_MODEL on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RERANK_ENDPOINT",
      "service": "Ingestion",
      "description": "Same as RERANK_ENDPOINT on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_MAX_INFLIGHT",
      "service": "Ingestion",
      "description": "Same as LLM_MAX_INFLIGHT on Backend.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DATABASE",
      "service": "Ingestion",
      "description": "Database holding the public (Alembic), frontend (Prisma) and vdb (pgvector) schemas.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Ingestion",
      "description": "Postgres password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CONNECTION_STRINGS",
      "service": "Ingestion",
      "description": "Same as CONNECTION_STRINGS on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REASONING_ENDPOINT",
      "service": "Ingestion",
      "description": "Same as REASONING_ENDPOINT on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTO_ONTOLOGY_IMAGE",
      "service": "Ingestion",
      "description": "Base image for this service's Docker build (Railway passes it as a build argument). Must match the Backend service's image.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NON_REASONING_MODEL",
      "service": "Ingestion",
      "description": "Same as NON_REASONING_MODEL on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PII_LLM_MAX_WORKERS",
      "service": "Ingestion",
      "description": "Concurrent model calls for PII classification, when enabled in Settings (upstream default 6).",
      "secret": false,
      "strategy": "default",
      "default": "6"
    },
    {
      "key": "DEFAULT_MODELS_MODEL",
      "service": "Ingestion",
      "description": "Same as DEFAULT_MODELS_MODEL on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_INVOKE_TIMEOUT_S",
      "service": "Ingestion",
      "description": "Same as LLM_INVOKE_TIMEOUT_S on Backend.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DEFAULT_MODELS_API_KEY",
      "service": "Ingestion",
      "description": "Same as DEFAULT_MODELS_API_KEY on Backend (change it there).",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NON_REASONING_ENDPOINT",
      "service": "Ingestion",
      "description": "Same as NON_REASONING_ENDPOINT on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DEFAULT_MODELS_ENDPOINT",
      "service": "Ingestion",
      "description": "Same as DEFAULT_MODELS_ENDPOINT on Backend (change it there).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TEMPLATE_SAMPLE_DB_HOST",
      "service": "Ingestion",
      "description": "Sample Data private host.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TEMPLATE_SAMPLE_DB_NAME",
      "service": "Ingestion",
      "description": "Sample database name (chinook).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TEMPLATE_SAMPLE_DB_PORT",
      "service": "Ingestion",
      "description": "Sample Data port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TEMPLATE_SAMPLE_DB_USER",
      "service": "Ingestion",
      "description": "Read-only login for the sample database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SEMANTIC_LLM_MAX_INFLIGHT",
      "service": "Ingestion",
      "description": "Concurrent model calls during semantic compilation (upstream default 6). Lower it on rate-limited keys.",
      "secret": false,
      "strategy": "default",
      "default": "6"
    },
    {
      "key": "TEMPLATE_SAMPLE_CONNECTION",
      "service": "Ingestion",
      "description": "On the first boot of a fresh catalog, register the Chinook database on Sample Data as a normal connection (removable in Settings -> Connections). Runs once; false skips it.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "TEMPLATE_SAMPLE_DB_PASSWORD",
      "service": "Ingestion",
      "description": "Password of that login.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TEMPLATE_SAMPLE_WAIT_SECONDS",
      "service": "Ingestion",
      "description": "Max seconds the first boot waits for Sample Data to accept connections.",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "TEMPLATE_STARTUP_WAIT_SECONDS",
      "service": "Ingestion",
      "description": "Max seconds the start wrapper waits for the Backend migration (and the first-boot steps) before giving up; keep it below the healthcheck timeout.",
      "secret": false,
      "strategy": "default",
      "default": "900"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Ingestion",
      "description": "Seconds between SIGTERM and SIGKILL on redeploy (schedulers stop cleanly).",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "TEMPLATE_ENABLE_SEMANTIC_COMPILATION",
      "service": "Ingestion",
      "description": "On the first boot, switch Settings -> Semantic Compilation on (only if never set), so questions work without manual steps. It re-runs every 24 h over every connected database and uses model calls; turn it off in the UI anytime.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Sample Data",
      "description": "Data directory inside the volume (Railway base layout).",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Sample Data",
      "description": "Private hostname (sample-data.railway.internal).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Sample Data",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Sample Data",
      "description": "User for the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Sample Data",
      "description": "Database the Data panel and Auto Ontology open (the Chinook sample).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Sample Data",
      "description": "Password for the Data panel.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Sample Data",
      "description": "Database created on first boot and filled with the Chinook sample (do not change after the first deploy).",
      "secret": false,
      "strategy": "default",
      "default": "chinook"
    },
    {
      "key": "DATABASE_URL",
      "service": "Sample Data",
      "description": "Superuser connection string (private network).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Sample Data",
      "description": "Superuser created on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Sample Data",
      "description": "Validity of the self-signed TLS certificate.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Sample Data",
      "description": "Superuser password, generated at deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SAMPLE_DATABASE_URL",
      "service": "Sample Data",
      "description": "Read-only connection string for the sample (private network).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SAMPLE_DB_READER_USER",
      "service": "Sample Data",
      "description": "Read-only login created on first boot for Auto Ontology (SELECT on Chinook only).",
      "secret": false,
      "strategy": "default",
      "default": "ao_reader"
    },
    {
      "key": "SAMPLE_DB_READER_PASSWORD",
      "service": "Sample Data",
      "description": "Password of that login, generated at deploy; applied on first boot only.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SAMPLE_DB_READER_STATEMENT_TIMEOUT",
      "service": "Sample Data",
      "description": "statement_timeout of the read-only login (protects the demo from runaway SQL).",
      "secret": false,
      "strategy": "default",
      "default": "120s"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Sample Data",
      "description": "Time Postgres gets to shut down cleanly on redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory inside the volume (Railway base layout; the image refuses anything outside /var/lib/postgresql/data).",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname of this database (postgres.railway.internal), used by the Data panel and the other services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "User for the Data panel and the other services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Database for the Data panel and the other services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for the Data panel and the other services.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot; the vector and pg_stat_statements extensions are created in it.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string (Railway convention).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PG_CPU_LIMIT",
      "service": "Postgres",
      "description": "CPUs the tuning plans for. auto = the container CPU quota capped at 8.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity of the self-signed TLS certificate.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "PGVECTOR_TUNING",
      "service": "Postgres",
      "description": "auto = size memory and parallelism from the container limits at every boot; off = Postgres defaults.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, generated at deploy (letters only: the app builds URLs from it without escaping). Changing it later needs ALTER USER too.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PG_MEMORY_LIMIT_MB",
      "service": "Postgres",
      "description": "RAM the tuning plans for. auto = the container limit capped at 8192 MB.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "RAILWAY_SHM_SIZE_BYTES",
      "service": "Postgres",
      "description": "Size of /dev/shm (1 GiB; Railway default 64 MB) for parallel HNSW index builds and parallel queries; only memory in use is billed.",
      "secret": false,
      "strategy": "default",
      "default": "1073741824"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time Postgres gets to shut down cleanly on redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "MCP Server",
      "description": "Port Railway health-checks (MCP endpoint is /mcp).",
      "secret": false,
      "strategy": "default",
      "default": "3003"
    },
    {
      "key": "AUTO_ONTOLOGY_API_URL",
      "service": "MCP Server",
      "description": "Public Auto Ontology web app: the OAuth authorization server MCP clients sign in with, and the API every tool call goes through as the signed-in user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_HOST",
      "service": "MCP Server",
      "description": "Bind address of the MCP server.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_PORT",
      "service": "MCP Server",
      "description": "Port of the MCP server (public domain target).",
      "secret": false,
      "strategy": "default",
      "default": "3003"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_IMAGE",
      "service": "MCP Server",
      "description": "NVIDIA's the MCP server image this service's Docker build starts FROM (Railway passes it as a build argument). Upgrade all Auto Ontology services together.",
      "secret": false,
      "strategy": "default",
      "default": "nvcr.io/nvidia/auto-ontology-mcp:1.1.0@sha256:3b8f9e5703c99d6521a572f1c777c0723e0f377dfcd7d08df6ff03475cfcaa26"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_TIMEOUT_S",
      "service": "MCP Server",
      "description": "Timeout for catalog and glossary API calls, in seconds.",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_PUBLIC_URL",
      "service": "MCP Server",
      "description": "This server's public origin (set on Frontend, so both always agree).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_CHAT_TIMEOUT_S",
      "service": "MCP Server",
      "description": "Timeout for one ask_question run (many model calls), in seconds.",
      "secret": false,
      "strategy": "default",
      "default": "900"
    },
    {
      "key": "PORT",
      "service": "Frontend",
      "description": "Port the Next.js server listens on (public domain target, healthcheck).",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "APP_URL",
      "service": "Frontend",
      "description": "Public origin of the web app, required by Better Auth (sessions, CSRF, OAuth issuer, SSO callback). Change it when you add a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "HOSTNAME",
      "service": "Frontend",
      "description": "Bind address of the Next.js server.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "APP_VERSION",
      "service": "Frontend",
      "description": "Version shown in the UI footer and logs.",
      "secret": false,
      "strategy": "default",
      "default": "1.1.0"
    },
    {
      "key": "AUTH_SECRET",
      "service": "Frontend",
      "description": "Better Auth signing secret, generated at deploy. Changing it signs everyone out.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "Frontend",
      "description": "Postgres private host (pgvector database for the catalog, auth tables and embeddings).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "Frontend",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Frontend",
      "description": "Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PYTHON_API_URL",
      "service": "Frontend",
      "description": "Backend API on the private network (read at runtime by the route handlers).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_DATABASE",
      "service": "Frontend",
      "description": "Database holding the public (Alembic), frontend (Prisma) and vdb (pgvector) schemas.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Frontend",
      "description": "Postgres password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_TELEMETRY_DISABLED",
      "service": "Frontend",
      "description": "No Next.js telemetry.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "AUTO_ONTOLOGY_ADMIN_EMAIL",
      "service": "Frontend",
      "description": "Login email of the bootstrap admin, created (or reset) on every start. Change it to yours.",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "AUTO_ONTOLOGY_ADMIN_PASSWORD",
      "service": "Frontend",
      "description": "Password of the bootstrap admin, generated at deploy and re-applied on every start (change it here and redeploy to rotate).",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "AUTO_ONTOLOGY_FRONTEND_IMAGE",
      "service": "Frontend",
      "description": "NVIDIA's the web app image this service's Docker build starts FROM (Railway passes it as a build argument). Upgrade all Auto Ontology services together.",
      "secret": false,
      "strategy": "default",
      "default": "nvcr.io/nvidia/auto-ontology-frontend:1.1.0@sha256:c45cbd9a15169d159a5752ab054595773324393af9aac23acef9221fbe716b97"
    },
    {
      "key": "AUTO_ONTOLOGY_MCP_PUBLIC_URL",
      "service": "Frontend",
      "description": "Public origin of the MCP server (without /mcp); OAuth tokens for MCP clients are bound to it. The MCP Server service references this value.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Frontend",
      "description": "Seconds between SIGTERM and SIGKILL on redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "auto-ontology-v1-semantic-layer-for-ai-a"
      }
    },
    "cli": "railway deploy --template auto-ontology-v1-semantic-layer-for-ai-a",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dc6039c0-5b38-48c1-b81d-3578b8e7b018",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0289f67b-0f41-50fd-85f1-33b6731e4543": {
                  "icon": "https://cdn.jsdelivr.net/npm/lucide-static@1.59.0/icons/server.svg",
                  "name": "Backend",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/api/health",
                    "preDeployCommand": [
                      "/bin/sh -c 'cd /app || exit 1; i=1; until /usr/local/bin/entrypoint.sh migrate; do if [ \"$i\" -ge 60 ]; then echo \"[railway] alembic upgrade failed 60 times, giving up\" >&2; exit 1; fi; echo \"[railway] alembic upgrade attempt $i failed (Postgres still starting?), retrying in 10 s\" >&2; i=$((i+1)); sleep 10; done'"
                    ],
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 600,
                    "preDeployTimeoutSeconds": 900
                  },
                  "source": {
                    "repo": "baranberkay96/auto-ontology-railway",
                    "branch": "main",
                    "rootDirectory": "/services/backend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port Railway health-checks (the API server always listens on 0.0.0.0:3001). Never add a public domain: this service trusts the x-auto-ontology-user-id header from the Frontend.",
                      "defaultValue": "3001"
                    },
                    "APP_VERSION": {
                      "isOptional": true,
                      "description": "Version shown in logs (matches the pinned image).",
                      "defaultValue": "1.1.0"
                    },
                    "EMBED_MODEL": {
                      "isOptional": true,
                      "description": "Embedding model (upstream default; the vector table is created for 2048 dimensions).",
                      "defaultValue": "nvidia/nemotron-3-embed-1b"
                    },
                    "RERANK_MODEL": {
                      "isOptional": true,
                      "description": "Reranking model (upstream default).",
                      "defaultValue": "nvidia/llama-nemotron-rerank-vl-1b-v2"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": true,
                      "description": "Postgres private host (pgvector database for the catalog, auth tables and embeddings).",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": true,
                      "description": "Postgres port.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "Postgres user.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "EMBED_ENDPOINT": {
                      "isOptional": true,
                      "description": "Embedding endpoint (NVIDIA NIM API). Ingest and query must use the same model; changing it needs a re-ingest.",
                      "defaultValue": "https://integrate.api.nvidia.com/v1"
                    },
                    "OMP_NUM_THREADS": {
                      "isOptional": true,
                      "description": "Caps native thread pools (numpy, onnxruntime) to the service's CPU share instead of the host's core count.",
                      "defaultValue": "4"
                    },
                    "REASONING_MODEL": {
                      "isOptional": true,
                      "description": "Main chat / NL-to-SQL model (upstream default).",
                      "defaultValue": "nvidia/nemotron-3-ultra-550b-a55b"
                    },
                    "RERANK_ENDPOINT": {
                      "isOptional": true,
                      "description": "Reranking endpoint (NVIDIA NIM reranking API).",
                      "defaultValue": "https://ai.api.nvidia.com/v1/retrieval/nvidia/llama-nemotron-rerank-vl-1b-v2/reranking"
                    },
                    "LLM_MAX_INFLIGHT": {
                      "isOptional": true,
                      "description": "Max concurrent model requests per process (0 = unbounded). 6 stays under the hosted endpoint's per-key concurrency; lower it if you see HTTP 429/503.",
                      "defaultValue": "6"
                    },
                    "POSTGRES_DATABASE": {
                      "isOptional": true,
                      "description": "Database holding the public (Alembic), frontend (Prisma) and vdb (pgvector) schemas.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": true,
                      "description": "Postgres password.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "CONNECTION_STRINGS": {
                      "isOptional": true,
                      "description": "Optional. Comma-separated source database URLs (postgresql://user:pass@host:5432/db, snowflake://..., ...). When set, connections come only from here and the Connections settings page is hidden. Leave empty to manage connections in the UI.",
                      "defaultValue": ""
                    },
                    "REASONING_ENDPOINT": {
                      "isOptional": true,
                      "description": "Main chat / NL-to-SQL model endpoint. Any OpenAI-compatible chat endpoint works; set REASONING_API_KEY for another provider.",
                      "defaultValue": "https://integrate.api.nvidia.com/v1"
                    },
                    "AUTO_ONTOLOGY_IMAGE": {
                      "isOptional": true,
                      "description": "NVIDIA's the backend + ingestion image this service's Docker build starts FROM (Railway passes it as a build argument). Upgrade all Auto Ontology services together.",
                      "defaultValue": "nvcr.io/nvidia/auto-ontology:1.1.0@sha256:d6d50ee5fb3617dce218ea9706e737c181e3eb6afcaf15cd954364a341aef57b"
                    },
                    "NON_REASONING_MODEL": {
                      "isOptional": true,
                      "description": "Lighter model (upstream default).",
                      "defaultValue": "nvidia/nemotron-3-ultra-550b-a55b"
                    },
                    "DEFAULT_MODELS_MODEL": {
                      "isOptional": true,
                      "description": "Shared default model for any model field left unset (upstream default).",
                      "defaultValue": "nvidia/nemotron-3-ultra-550b-a55b"
                    },
                    "LLM_INVOKE_TIMEOUT_S": {
                      "isOptional": true,
                      "description": "Timeout per model call, in seconds.",
                      "defaultValue": "120"
                    },
                    "INGESTION_SERVICE_URL": {
                      "isOptional": true,
                      "description": "Ingestion service on the private network (ingest and semantic compilation triggers).",
                      "defaultValue": "http://${{Ingestion.RAILWAY_PRIVATE_DOMAIN}}:3002"
                    },
                    "DEFAULT_MODELS_API_KEY": {
                      "isOptional": false,
                      "description": "Required. NVIDIA API key (nvapi-...), free from build.nvidia.com; used by every model below unless REASONING_API_KEY, NON_REASONING_API_KEY, EMBED_API_KEY or RERANK_API_KEY is set. Hosted endpoints are governed by NVIDIA's API trial terms.",
                      "defaultValue": "{{DEFAULT_MODELS_API_KEY}}"
                    },
                    "NON_REASONING_ENDPOINT": {
                      "isOptional": true,
                      "description": "Lighter model endpoint (entity extraction). OpenAI-compatible; set NON_REASONING_API_KEY for another provider.",
                      "defaultValue": "https://integrate.api.nvidia.com/v1"
                    },
                    "DEFAULT_MODELS_ENDPOINT": {
                      "isOptional": true,
                      "description": "Shared default endpoint (OpenAI-compatible) for any model field left unset.",
                      "defaultValue": "https://integrate.api.nvidia.com/v1"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Seconds between SIGTERM and SIGKILL on redeploy (lets running chat turns finish).",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                },
                "3cd13e0c-c94c-5565-aaba-23707cb08541": {
                  "icon": "https://cdn.jsdelivr.net/npm/lucide-static@1.59.0/icons/database-zap.svg",
                  "name": "Ingestion",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 1200
                  },
                  "source": {
                    "repo": "baranberkay96/auto-ontology-railway",
                    "branch": "main",
                    "rootDirectory": "/services/ingestion"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port Railway health-checks.",
                      "defaultValue": "3002"
                    },
                    "APP_VERSION": {
                      "isOptional": true,
                      "description": "Version shown in logs (matches the pinned image).",
                      "defaultValue": "1.1.0"
                    },
                    "EMBED_MODEL": {
                      "isOptional": true,
                      "description": "Same as EMBED_MODEL on Backend (change it there).",
                      "defaultValue": "${{Backend.EMBED_MODEL}}"
                    },
                    "RERANK_MODEL": {
                      "isOptional": true,
                      "description": "Same as RERANK_MODEL on Backend (change it there).",
                      "defaultValue": "${{Backend.RERANK_MODEL}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": true,
                      "description": "Postgres private host (pgvector database for the catalog, auth tables and embeddings).",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": true,
                      "description": "Postgres port.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "Postgres user.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "EMBED_ENDPOINT": {
                      "isOptional": true,
                      "description": "Same as EMBED_ENDPOINT on Backend (change it there).",
                      "defaultValue": "${{Backend.EMBED_ENDPOINT}}"
                    },
                    "INGESTION_PORT": {
                      "isOptional": true,
                      "description": "Port the ingestion service listens on (0.0.0.0, private network only).",
                      "defaultValue": "3002"
                    },
                    "OMP_NUM_THREADS": {
                      "isOptional": true,
                      "description": "Caps native thread pools (numpy, onnxruntime) to the service's CPU share instead of the host's core count.",
                      "defaultValue": "4"
                    },
                    "REASONING_MODEL": {
                      "isOptional": true,
                      "description": "Same as REASONING_MODEL on Backend (change it there).",
                      "defaultValue": "${{Backend.REASONING_MODEL}}"
                    },
                    "RERANK_ENDPOINT": {
                      "isOptional": true,
                      "description": "Same as RERANK_ENDPOINT on Backend (change it there).",
                      "defaultValue": "${{Backend.RERANK_ENDPOINT}}"
                    },
                    "LLM_MAX_INFLIGHT": {
                      "isOptional": true,
                      "description": "Same as LLM_MAX_INFLIGHT on Backend.",
                      "defaultValue": "${{Backend.LLM_MAX_INFLIGHT}}"
                    },
                    "POSTGRES_DATABASE": {
                      "isOptional": true,
                      "description": "Database holding the public (Alembic), frontend (Prisma) and vdb (pgvector) schemas.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": true,
                      "description": "Postgres password.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "CONNECTION_STRINGS": {
                      "isOptional": true,
                      "description": "Same as CONNECTION_STRINGS on Backend (change it there).",
                      "defaultValue": "${{Backend.CONNECTION_STRINGS}}"
                    },
                    "REASONING_ENDPOINT": {
                      "isOptional": true,
                      "description": "Same as REASONING_ENDPOINT on Backend (change it there).",
                      "defaultValue": "${{Backend.REASONING_ENDPOINT}}"
                    },
                    "AUTO_ONTOLOGY_IMAGE": {
                      "isOptional": true,
                      "description": "Base image for this service's Docker build (Railway passes it as a build argument). Must match the Backend service's image.",
                      "defaultValue": "${{Backend.AUTO_ONTOLOGY_IMAGE}}"
                    },
                    "NON_REASONING_MODEL": {
                      "isOptional": true,
                      "description": "Same as NON_REASONING_MODEL on Backend (change it there).",
                      "defaultValue": "${{Backend.NON_REASONING_MODEL}}"
                    },
                    "PII_LLM_MAX_WORKERS": {
                      "isOptional": true,
                      "description": "Concurrent model calls for PII classification, when enabled in Settings (upstream default 6).",
                      "defaultValue": "6"
                    },
                    "DEFAULT_MODELS_MODEL": {
                      "isOptional": true,
                      "description": "Same as DEFAULT_MODELS_MODEL on Backend (change it there).",
                      "defaultValue": "${{Backend.DEFAULT_MODELS_MODEL}}"
                    },
                    "LLM_INVOKE_TIMEOUT_S": {
                      "isOptional": true,
                      "description": "Same as LLM_INVOKE_TIMEOUT_S on Backend.",
                      "defaultValue": "${{Backend.LLM_INVOKE_TIMEOUT_S}}"
                    },
                    "DEFAULT_MODELS_API_KEY": {
                      "isOptional": true,
                      "description": "Same as DEFAULT_MODELS_API_KEY on Backend (change it there).",
                      "defaultValue": "${{Backend.DEFAULT_MODELS_API_KEY}}"
                    },
                    "NON_REASONING_ENDPOINT": {
                      "isOptional": true,
                      "description": "Same as NON_REASONING_ENDPOINT on Backend (change it there).",
                      "defaultValue": "${{Backend.NON_REASONING_ENDPOINT}}"
                    },
                    "DEFAULT_MODELS_ENDPOINT": {
                      "isOptional": true,
                      "description": "Same as DEFAULT_MODELS_ENDPOINT on Backend (change it there).",
                      "defaultValue": "${{Backend.DEFAULT_MODELS_ENDPOINT}}"
                    },
                    "TEMPLATE_SAMPLE_DB_HOST": {
                      "isOptional": true,
                      "description": "Sample Data private host.",
                      "defaultValue": "${{Sample Data.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "TEMPLATE_SAMPLE_DB_NAME": {
                      "isOptional": true,
                      "description": "Sample database name (chinook).",
                      "defaultValue": "${{Sample Data.PGDATABASE}}"
                    },
                    "TEMPLATE_SAMPLE_DB_PORT": {
                      "isOptional": true,
                      "description": "Sample Data port.",
                      "defaultValue": "${{Sample Data.PGPORT}}"
                    },
                    "TEMPLATE_SAMPLE_DB_USER": {
                      "isOptional": true,
                      "description": "Read-only login for the sample database.",
                      "defaultValue": "${{Sample Data.SAMPLE_DB_READER_USER}}"
                    },
                    "SEMANTIC_LLM_MAX_INFLIGHT": {
                      "isOptional": true,
                      "description": "Concurrent model calls during semantic compilation (upstream default 6). Lower it on rate-limited keys.",
                      "defaultValue": "6"
                    },
                    "TEMPLATE_SAMPLE_CONNECTION": {
                      "isOptional": true,
                      "description": "On the first boot of a fresh catalog, register the Chinook database on Sample Data as a normal connection (removable in Settings -> Connections). Runs once; false skips it.",
                      "defaultValue": "true"
                    },
                    "TEMPLATE_SAMPLE_DB_PASSWORD": {
                      "isOptional": true,
                      "description": "Password of that login.",
                      "defaultValue": "${{Sample Data.SAMPLE_DB_READER_PASSWORD}}"
                    },
                    "TEMPLATE_SAMPLE_WAIT_SECONDS": {
                      "isOptional": true,
                      "description": "Max seconds the first boot waits for Sample Data to accept connections.",
                      "defaultValue": "300"
                    },
                    "TEMPLATE_STARTUP_WAIT_SECONDS": {
                      "isOptional": true,
                      "description": "Max seconds the start wrapper waits for the Backend migration (and the first-boot steps) before giving up; keep it below the healthcheck timeout.",
                      "defaultValue": "900"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Seconds between SIGTERM and SIGKILL on redeploy (schedulers stop cleanly).",
                      "defaultValue": "60"
                    },
                    "TEMPLATE_ENABLE_SEMANTIC_COMPILATION": {
                      "isOptional": true,
                      "description": "On the first boot, switch Settings -> Semantic Compilation on (only if never set), so questions work without manual steps. It re-runs every 24 h over every connected database and uses model calls; turn it off in the UI anytime.",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                },
                "65d5fc95-dac8-5fed-aa1f-4f558b2497a5": {
                  "icon": "https://cdn.jsdelivr.net/npm/lucide-static@1.59.0/icons/database.svg",
                  "name": "Sample Data",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "baranberkay96/auto-ontology-railway",
                    "branch": "main",
                    "rootDirectory": "/services/sample-data"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory inside the volume (Railway base layout).",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname (sample-data.railway.internal).",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "User for the Data panel.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database the Data panel and Auto Ontology open (the Chinook sample).",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Data panel.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot and filled with the Chinook sample (do not change after the first deploy).",
                      "defaultValue": "chinook"
                    },
                    "DATABASE_URL": {
                      "isOptional": true,
                      "description": "Superuser connection string (private network).",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "Validity of the self-signed TLS certificate.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, generated at deploy.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "SAMPLE_DATABASE_URL": {
                      "isOptional": true,
                      "description": "Read-only connection string for the sample (private network).",
                      "defaultValue": "postgresql://${{SAMPLE_DB_READER_USER}}:${{SAMPLE_DB_READER_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "SAMPLE_DB_READER_USER": {
                      "isOptional": true,
                      "description": "Read-only login created on first boot for Auto Ontology (SELECT on Chinook only).",
                      "defaultValue": "ao_reader"
                    },
                    "SAMPLE_DB_READER_PASSWORD": {
                      "isOptional": true,
                      "description": "Password of that login, generated at deploy; applied on first boot only.",
                      "defaultValue": "{{SAMPLE_DB_READER_PASSWORD}}"
                    },
                    "SAMPLE_DB_READER_STATEMENT_TIMEOUT": {
                      "isOptional": true,
                      "description": "statement_timeout of the read-only login (protects the demo from runaway SQL).",
                      "defaultValue": "120s"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Time Postgres gets to shut down cleanly on redeploy.",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "52a09bba-d678-5a9e-a46c-e74b1dfb728f": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "6a743f18-99ac-5096-82c5-8b5c98ddc6f5": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": "/usr/bin/tini -g -- /bin/bash -c 'set -e; D=\"${PGDATA%/}\"; F=\"$D/pgvector-tuning.conf\"; C=\"$D/postgresql.conf\"; I=/docker-entrypoint-initdb.d; X=/tmp/pgvector-tuning.conf; echo \"CREATE EXTENSION IF NOT EXISTS vector; CREATE EXTENSION IF NOT EXISTS pg_stat_statements;\" > $I/zz-pgvector-extensions.sql; k() { v=$1; if [ $v -lt $2 ]; then v=$2; fi; if [ $v -gt $3 ]; then v=$3; fi; echo $v; }; n() { case \"$1\" in \"\"|*[!0-9]*) echo $2 ;; *) echo $1 ;; esac; }; w() { echo \"$1 = $2\" >> $X; }; if [ \"${PGVECTOR_TUNING:-auto}\" = off ]; then rm -f $F $I/zz-pgvector-conf.sh; echo \"pgvector-tune: PGVECTOR_TUNING=off, Postgres defaults apply\"; else H=$(( $(n \"$(grep -m 1 MemTotal /proc/meminfo | tr -s \" \" | cut -d \" \" -f 2)\" 1048576) / 1024 )); M=$(( $(n \"$(cat /sys/fs/cgroup/memory.max 2>/dev/null)\" $((H * 1048576))) / 1048576 )); if [ $M -gt $H ]; then M=$H; fi; B=$(k $(n \"$PG_MEMORY_LIMIT_MB\" $(k $M 256 8192)) 256 4194304); N=$(nproc); read -r Q P 2>/dev/null < /sys/fs/cgroup/cpu.max || Q=max; case \"$Q\" in \"\"|*[!0-9]*) ;; *) N=$(k $(( (Q + P - 1) / P )) 1 $N) ;; esac; N=$(k $(n \"$PG_CPU_LIMIT\" $(k $N 1 8)) 1 256); S=$(( $(n \"$(df -Pk /dev/shm 2>/dev/null | tail -n 1 | tr -s \" \" | cut -d \" \" -f 2)\" 65536) / 1024 )); SB=$(k $((B / 4)) 128 1048576); MW=$(k $((B / 4)) 64 2048); PM=$(k $((N - 1)) 0 4); PW=$(k $N 2 256); PG=$(k $((N / 2)) 0 2); FIT=$((S * 3 / 4)); if [ $FIT -lt 128 ]; then PM=0; fi; if [ $PM -gt 0 ]; then MW=$(k $MW 64 $FIT); fi; if [ $S -lt 256 ]; then PG=0; fi; echo \"# pgvector template: rewritten at every boot from budget ${B}MB (container ${M}MB), ${N} cpus, /dev/shm ${S}MB; ALTER SYSTEM overrides it\" > $X; w shared_buffers ${SB}MB; w effective_cache_size $((B * 3 / 4))MB; w maintenance_work_mem ${MW}MB; w autovacuum_work_mem $(k $((B / 16)) 64 $MW)MB; w work_mem $(k $((B / 512)) 4 64)MB; w max_worker_processes $(k $((PW + 4)) 8 512); w max_parallel_workers $PW; w max_parallel_workers_per_gather $PG; w max_parallel_maintenance_workers $PM; w random_page_cost 1.1; w effective_io_concurrency 200; w track_io_timing on; chmod 644 $X; if [ -f $D/PG_VERSION ] && [ -f $C ]; then install -o postgres -g postgres -m 600 $X $F; grep -qsF \"include_if_exists = pgvector-tuning.conf\" $C || echo \"include_if_exists = pgvector-tuning.conf\" >> $C; sync $F $C 2>/dev/null || true; else echo \"cp $X $F && chmod 600 $F && { grep -qsF pgvector-tuning.conf $C || echo include_if_exists = pgvector-tuning.conf >> $C; }\" > $I/zz-pgvector-conf.sh; fi; echo \"pgvector-tune: $(paste -sd \" \" $X)\"; fi; exec /usr/local/bin/wrapper.sh \"$@\"' pgvector-start postgres -p 5432 -c listen_addresses=*",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory inside the volume (Railway base layout; the image refuses anything outside /var/lib/postgresql/data).",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname of this database (postgres.railway.internal), used by the Data panel and the other services.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "User for the Data panel and the other services.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database for the Data panel and the other services.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Data panel and the other services.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot; the vector and pg_stat_statements extensions are created in it.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": true,
                      "description": "Private connection string (Railway convention).",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "PG_CPU_LIMIT": {
                      "isOptional": true,
                      "description": "CPUs the tuning plans for. auto = the container CPU quota capped at 8.",
                      "defaultValue": "auto"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "Validity of the self-signed TLS certificate.",
                      "defaultValue": "820"
                    },
                    "PGVECTOR_TUNING": {
                      "isOptional": true,
                      "description": "auto = size memory and parallelism from the container limits at every boot; off = Postgres defaults.",
                      "defaultValue": "auto"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, generated at deploy (letters only: the app builds URLs from it without escaping). Changing it later needs ALTER USER too.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "PG_MEMORY_LIMIT_MB": {
                      "isOptional": true,
                      "description": "RAM the tuning plans for. auto = the container limit capped at 8192 MB.",
                      "defaultValue": "auto"
                    },
                    "RAILWAY_SHM_SIZE_BYTES": {
                      "isOptional": true,
                      "description": "Size of /dev/shm (1 GiB; Railway default 64 MB) for parallel HNSW index builds and parallel queries; only memory in use is billed.",
                      "defaultValue": "1073741824"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Time Postgres gets to shut down cleanly on redeploy.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "21c13df2-e0cc-560d-a7bb-869938274bd7": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "724b0ce4-875e-53e3-85a0-6820ac2fdcdd": {
                  "icon": "https://cdn.jsdelivr.net/npm/lucide-static@1.59.0/icons/plug.svg",
                  "name": "MCP Server",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/.well-known/oauth-protected-resource/mcp",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 300
                  },
                  "source": {
                    "repo": "baranberkay96/auto-ontology-railway",
                    "branch": "main",
                    "rootDirectory": "/services/mcp"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port Railway health-checks (MCP endpoint is /mcp).",
                      "defaultValue": "3003"
                    },
                    "AUTO_ONTOLOGY_API_URL": {
                      "isOptional": true,
                      "description": "Public Auto Ontology web app: the OAuth authorization server MCP clients sign in with, and the API every tool call goes through as the signed-in user.",
                      "defaultValue": "${{Frontend.APP_URL}}"
                    },
                    "AUTO_ONTOLOGY_MCP_HOST": {
                      "isOptional": true,
                      "description": "Bind address of the MCP server.",
                      "defaultValue": "0.0.0.0"
                    },
                    "AUTO_ONTOLOGY_MCP_PORT": {
                      "isOptional": true,
                      "description": "Port of the MCP server (public domain target).",
                      "defaultValue": "3003"
                    },
                    "AUTO_ONTOLOGY_MCP_IMAGE": {
                      "isOptional": true,
                      "description": "NVIDIA's the MCP server image this service's Docker build starts FROM (Railway passes it as a build argument). Upgrade all Auto Ontology services together.",
                      "defaultValue": "nvcr.io/nvidia/auto-ontology-mcp:1.1.0@sha256:3b8f9e5703c99d6521a572f1c777c0723e0f377dfcd7d08df6ff03475cfcaa26"
                    },
                    "AUTO_ONTOLOGY_MCP_TIMEOUT_S": {
                      "isOptional": true,
                      "description": "Timeout for catalog and glossary API calls, in seconds.",
                      "defaultValue": "30"
                    },
                    "AUTO_ONTOLOGY_MCP_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "This server's public origin (set on Frontend, so both always agree).",
                      "defaultValue": "${{Frontend.AUTO_ONTOLOGY_MCP_PUBLIC_URL}}"
                    },
                    "AUTO_ONTOLOGY_MCP_CHAT_TIMEOUT_S": {
                      "isOptional": true,
                      "description": "Timeout for one ask_question run (many model calls), in seconds.",
                      "defaultValue": "900"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:3003": {
                        "port": 3003
                      }
                    }
                  }
                },
                "c4f614e0-a6ff-5ebb-89cd-e5fb62a9d718": {
                  "icon": "https://cdn.jsdelivr.net/npm/lucide-static@1.59.0/icons/network.svg",
                  "name": "Frontend",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/api/health",
                    "preDeployCommand": [
                      "/bin/sh -c 'cd /app/migrate || exit 1; i=1; until sh prisma/migrate.sh; do if [ \"$i\" -ge 60 ]; then echo \"[railway] prisma schema sync failed 60 times, giving up\" >&2; exit 1; fi; echo \"[railway] prisma schema sync attempt $i failed (Postgres still starting?), retrying in 10 s\" >&2; i=$((i+1)); sleep 10; done'"
                    ],
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 600,
                    "preDeployTimeoutSeconds": 900
                  },
                  "source": {
                    "repo": "baranberkay96/auto-ontology-railway",
                    "branch": "main",
                    "rootDirectory": "/services/frontend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Port the Next.js server listens on (public domain target, healthcheck).",
                      "defaultValue": "3000"
                    },
                    "APP_URL": {
                      "isOptional": true,
                      "description": "Public origin of the web app, required by Better Auth (sessions, CSRF, OAuth issuer, SSO callback). Change it when you add a custom domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "HOSTNAME": {
                      "isOptional": true,
                      "description": "Bind address of the Next.js server.",
                      "defaultValue": "0.0.0.0"
                    },
                    "APP_VERSION": {
                      "isOptional": true,
                      "description": "Version shown in the UI footer and logs.",
                      "defaultValue": "1.1.0"
                    },
                    "AUTH_SECRET": {
                      "isOptional": true,
                      "description": "Better Auth signing secret, generated at deploy. Changing it signs everyone out.",
                      "defaultValue": "{{AUTH_SECRET}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": true,
                      "description": "Postgres private host (pgvector database for the catalog, auth tables and embeddings).",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": true,
                      "description": "Postgres port.",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "Postgres user.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "PYTHON_API_URL": {
                      "isOptional": true,
                      "description": "Backend API on the private network (read at runtime by the route handlers).",
                      "defaultValue": "http://${{Backend.RAILWAY_PRIVATE_DOMAIN}}:3001"
                    },
                    "POSTGRES_DATABASE": {
                      "isOptional": true,
                      "description": "Database holding the public (Alembic), frontend (Prisma) and vdb (pgvector) schemas.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": true,
                      "description": "Postgres password.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "NEXT_TELEMETRY_DISABLED": {
                      "isOptional": true,
                      "description": "No Next.js telemetry.",
                      "defaultValue": "1"
                    },
                    "AUTO_ONTOLOGY_ADMIN_EMAIL": {
                      "isOptional": true,
                      "description": "Login email of the bootstrap admin, created (or reset) on every start. Change it to yours.",
                      "defaultValue": "admin@example.com"
                    },
                    "AUTO_ONTOLOGY_ADMIN_PASSWORD": {
                      "isOptional": true,
                      "description": "Password of the bootstrap admin, generated at deploy and re-applied on every start (change it here and redeploy to rotate).",
                      "defaultValue": "{{AUTO_ONTOLOGY_ADMIN_PASSWORD}}"
                    },
                    "AUTO_ONTOLOGY_FRONTEND_IMAGE": {
                      "isOptional": true,
                      "description": "NVIDIA's the web app image this service's Docker build starts FROM (Railway passes it as a build argument). Upgrade all Auto Ontology services together.",
                      "defaultValue": "nvcr.io/nvidia/auto-ontology-frontend:1.1.0@sha256:c45cbd9a15169d159a5752ab054595773324393af9aac23acef9221fbe716b97"
                    },
                    "AUTO_ONTOLOGY_MCP_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "Public origin of the MCP server (without /mcp); OAuth tokens for MCP clients are bound to it. The MCP Server service references this value.",
                      "defaultValue": "https://${{MCP Server.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Seconds between SIGTERM and SIGKILL on redeploy.",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "MCP Server",
      "method": "GET",
      "path": "/.well-known/oauth-protected-resource/mcp",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 6,
    "needs_volume": true
  },
  "generated_at": "2026-11-03T10:15:14.699Z",
  "generator_version": "0.1.0"
}
