{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0ed872c0-5030-4261-9fc1-f155d020ff0c",
    "slug": "docling-serve",
    "name": "Docling Serve",
    "description": "API-key-protected CPU document conversion",
    "url": "https://railway.com/deploy/docling-serve",
    "upstream": {
      "repo_url": "https://github.com/monotykamary/railway-template-docling-serve"
    }
  },
  "services": [
    {
      "name": "docling-serve",
      "source": {
        "repo": "https://github.com/monotykamary/railway-template-docling-serve"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "docling-serve",
      "description": "Railway service port.",
      "secret": false,
      "strategy": "default",
      "default": "5001"
    },
    {
      "key": "UVICORN_PORT",
      "service": "docling-serve",
      "description": "Internal API port.",
      "secret": false,
      "strategy": "default",
      "default": "5001"
    },
    {
      "key": "OMP_NUM_THREADS",
      "service": "docling-serve",
      "description": "Bound CPU library thread fan-out.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "UVICORN_WORKERS",
      "service": "docling-serve",
      "description": "One API worker to avoid duplicate model memory.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "MALLOC_ARENA_MAX",
      "service": "docling-serve",
      "description": "Bound glibc allocator arena growth.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "DOCLING_SERVE_API_KEY",
      "service": "docling-serve",
      "description": "Generated key required in X-Api-Key for conversion routes.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DOCLING_SERVE_ENABLE_UI",
      "service": "docling-serve",
      "description": "Enable the interactive conversion UI.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCLING_SERVE_LOG_LEVEL",
      "service": "docling-serve",
      "description": "Operational log level.",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "DOCLING_SERVE_LOG_FORMAT",
      "service": "docling-serve",
      "description": "Structured production logs.",
      "secret": false,
      "strategy": "default",
      "default": "json"
    },
    {
      "key": "DOCLING_SERVE_MAX_FILE_SIZE",
      "service": "docling-serve",
      "description": "Maximum input file size: 20 MiB.",
      "secret": false,
      "strategy": "default",
      "default": "20971520"
    },
    {
      "key": "DOCLING_SERVE_MAX_NUM_PAGES",
      "service": "docling-serve",
      "description": "Maximum pages per document.",
      "secret": false,
      "strategy": "default",
      "default": "50"
    },
    {
      "key": "DOCLING_SERVE_MAX_SYNC_WAIT",
      "service": "docling-serve",
      "description": "Maximum synchronous conversion wait in seconds.",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "DOCLING_SERVE_OPTIONS_CACHE_SIZE",
      "service": "docling-serve",
      "description": "Keep one converter/model option set in memory.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "DOCLING_SERVE_DEBUG_ERROR_DETAILS",
      "service": "docling-serve",
      "description": "Sanitize infrastructure error details.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCLING_SERVE_ENG_LOC_NUM_WORKERS",
      "service": "docling-serve",
      "description": "One local conversion worker.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "DOCLING_SERVE_LOAD_MODELS_AT_BOOT",
      "service": "docling-serve",
      "description": "Load default models before readiness succeeds.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCLING_SERVE_ENG_LOC_SHARE_MODELS",
      "service": "docling-serve",
      "description": "Share models with the local worker.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DOCLING_SERVE_ALLOW_EXTERNAL_PLUGINS",
      "service": "docling-serve",
      "description": "Block third-party connectors.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCLING_SERVE_ENABLE_REMOTE_SERVICES",
      "service": "docling-serve",
      "description": "Block optional remote model services.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCLING_SERVE_ALLOW_CUSTOM_VLM_CONFIG",
      "service": "docling-serve",
      "description": "Block arbitrary custom VLM configurations.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCLING_SERVE_ALLOW_CUSTOM_CODE_FORMULA_CONFIG",
      "service": "docling-serve",
      "description": "Block arbitrary code/formula configurations.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_DESCRIPTION_CONFIG",
      "service": "docling-serve",
      "description": "Block arbitrary picture-description configurations.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "docling-serve"
      }
    },
    "cli": "railway deploy --template docling-serve",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0ed872c0-5030-4261-9fc1-f155d020ff0c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "f772a5d0-8111-4782-843b-d9d92cefaec5": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-docling-serve/59f660564719eb592001d4bbdd85dbeffaff47f6/assets/docling-icon.png",
                  "name": "docling-serve",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/readyz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/monotykamary/railway-template-docling-serve",
                    "commitSha": "9fa3fd4aa9bffb9a7ab0292a85acc10fe892f902",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Railway service port.",
                      "defaultValue": "5001"
                    },
                    "UVICORN_PORT": {
                      "isOptional": false,
                      "description": "Internal API port.",
                      "defaultValue": "5001"
                    },
                    "OMP_NUM_THREADS": {
                      "isOptional": false,
                      "description": "Bound CPU library thread fan-out.",
                      "defaultValue": "2"
                    },
                    "UVICORN_WORKERS": {
                      "isOptional": false,
                      "description": "One API worker to avoid duplicate model memory.",
                      "defaultValue": "1"
                    },
                    "MALLOC_ARENA_MAX": {
                      "isOptional": false,
                      "description": "Bound glibc allocator arena growth.",
                      "defaultValue": "2"
                    },
                    "DOCLING_SERVE_API_KEY": {
                      "isOptional": false,
                      "description": "Generated key required in X-Api-Key for conversion routes.",
                      "defaultValue": "{{DOCLING_SERVE_API_KEY}}"
                    },
                    "DOCLING_SERVE_ENABLE_UI": {
                      "isOptional": false,
                      "description": "Enable the interactive conversion UI.",
                      "defaultValue": "true"
                    },
                    "DOCLING_SERVE_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Operational log level.",
                      "defaultValue": "INFO"
                    },
                    "DOCLING_SERVE_LOG_FORMAT": {
                      "isOptional": false,
                      "description": "Structured production logs.",
                      "defaultValue": "json"
                    },
                    "DOCLING_SERVE_MAX_FILE_SIZE": {
                      "isOptional": false,
                      "description": "Maximum input file size: 20 MiB.",
                      "defaultValue": "20971520"
                    },
                    "DOCLING_SERVE_MAX_NUM_PAGES": {
                      "isOptional": false,
                      "description": "Maximum pages per document.",
                      "defaultValue": "50"
                    },
                    "DOCLING_SERVE_MAX_SYNC_WAIT": {
                      "isOptional": false,
                      "description": "Maximum synchronous conversion wait in seconds.",
                      "defaultValue": "300"
                    },
                    "DOCLING_SERVE_OPTIONS_CACHE_SIZE": {
                      "isOptional": false,
                      "description": "Keep one converter/model option set in memory.",
                      "defaultValue": "1"
                    },
                    "DOCLING_SERVE_DEBUG_ERROR_DETAILS": {
                      "isOptional": false,
                      "description": "Sanitize infrastructure error details.",
                      "defaultValue": "false"
                    },
                    "DOCLING_SERVE_ENG_LOC_NUM_WORKERS": {
                      "isOptional": false,
                      "description": "One local conversion worker.",
                      "defaultValue": "1"
                    },
                    "DOCLING_SERVE_LOAD_MODELS_AT_BOOT": {
                      "isOptional": false,
                      "description": "Load default models before readiness succeeds.",
                      "defaultValue": "true"
                    },
                    "DOCLING_SERVE_ENG_LOC_SHARE_MODELS": {
                      "isOptional": false,
                      "description": "Share models with the local worker.",
                      "defaultValue": "true"
                    },
                    "DOCLING_SERVE_ALLOW_EXTERNAL_PLUGINS": {
                      "isOptional": false,
                      "description": "Block third-party connectors.",
                      "defaultValue": "false"
                    },
                    "DOCLING_SERVE_ENABLE_REMOTE_SERVICES": {
                      "isOptional": false,
                      "description": "Block optional remote model services.",
                      "defaultValue": "false"
                    },
                    "DOCLING_SERVE_ALLOW_CUSTOM_VLM_CONFIG": {
                      "isOptional": false,
                      "description": "Block arbitrary custom VLM configurations.",
                      "defaultValue": "false"
                    },
                    "DOCLING_SERVE_ALLOW_CUSTOM_CODE_FORMULA_CONFIG": {
                      "isOptional": false,
                      "description": "Block arbitrary code/formula configurations.",
                      "defaultValue": "false"
                    },
                    "DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_DESCRIPTION_CONFIG": {
                      "isOptional": false,
                      "description": "Block arbitrary picture-description configurations.",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5001": {
                        "port": 5001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "docling-serve",
      "method": "GET",
      "path": "/readyz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-06T06:11:24.955Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_41438de0b00d4554ac80",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 128,
    "typical_build_seconds": 71,
    "typical_start_seconds": 40,
    "slowest_service": "docling-serve"
  }
}
