{
  "$schema": "https://blueprints.servus.run/schema/servus-blueprint-v1.schema.json",
  "schemaVersion": "servus-blueprint/v1",
  "id": "nginx-site",
  "name": "Nginx Site Starter",
  "tagline": "Hardened Nginx web server with inline config and HTML page",
  "description": "Zero-database static site starter rendered purely from inline Compose configs including gzip, cache headers, and custom landing page.",
  "category": "web",
  "tags": [
    "nginx",
    "static",
    "web",
    "configs"
  ],
  "version": "2026-12-03.1",
  "publisher": "Servus Blueprints",
  "icon": "nginx",
  "homepage": "https://nginx.org",
  "license": "BSD-2-Clause",
  "setup": "Your site and custom Nginx server block are live immediately on the configured domain.",
  "inputs": [
    {
      "key": "siteTitle",
      "label": "Page title",
      "type": "text",
      "required": true,
      "default": "Servus Blueprint Site",
      "min": 1,
      "max": 80
    },
    {
      "key": "headline",
      "label": "Hero headline",
      "type": "text",
      "required": true,
      "default": "Deployed from Servus Blueprints",
      "min": 1,
      "max": 140
    },
    {
      "key": "theme",
      "label": "Accent theme",
      "type": "select",
      "default": "emerald",
      "options": [
        {
          "value": "slate",
          "label": "Slate"
        },
        {
          "value": "emerald",
          "label": "Emerald"
        },
        {
          "value": "amber",
          "label": "Amber"
        }
      ]
    },
    {
      "key": "enableGzip",
      "label": "Gzip compression",
      "type": "select",
      "default": "on",
      "options": [
        {
          "value": "on",
          "label": "Enabled"
        },
        {
          "value": "off",
          "label": "Disabled"
        }
      ],
      "group": "advanced"
    },
    {
      "key": "cacheMaxAgeSeconds",
      "label": "Static cache max-age (seconds)",
      "type": "number",
      "default": 3600,
      "min": 0,
      "max": 31536000,
      "group": "advanced"
    }
  ],
  "secrets": [],
  "domains": [
    {
      "key": "primary",
      "label": "Site domain",
      "service": "web",
      "port": 80,
      "primary": true
    },
    {
      "key": "preview",
      "label": "Preview domain",
      "service": "web",
      "port": 80,
      "subdomainPrefix": "preview"
    }
  ],
  "profiles": [
    {
      "id": "compact",
      "label": "Compact",
      "services": {
        "web": {
          "cpus": 0.25,
          "memoryMb": 128
        }
      }
    },
    {
      "id": "standard",
      "label": "Standard",
      "services": {
        "web": {
          "cpus": 0.5,
          "memoryMb": 256
        }
      }
    },
    {
      "id": "performance",
      "label": "Performance",
      "services": {
        "web": {
          "cpus": 1,
          "memoryMb": 512
        }
      }
    }
  ],
  "defaultProfile": "standard",
  "files": [
    {
      "key": "nginx_conf",
      "service": "web",
      "target": "/etc/nginx/conf.d/default.conf",
      "mode": 292,
      "content": "server {\n  listen 80;\n  server_name _;\n  root /usr/share/nginx/html;\n  index index.html;\n  gzip {{inputs.enableGzip|on}};\n\n  location / {\n    add_header X-Forwarded-Host $host;\n    add_header X-Client-IP $remote_addr;\n    add_header Cache-Control \"public, max-age={{inputs.cacheMaxAgeSeconds|3600}}\";\n    try_files $uri $uri/ /index.html;\n  }\n}\n"
    },
    {
      "key": "index_html",
      "service": "web",
      "target": "/usr/share/nginx/html/index.html",
      "mode": 292,
      "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n  <title>{{inputs.siteTitle|Servus Blueprint Site}}</title>\n</head>\n<body data-theme=\"{{inputs.theme|emerald}}\">\n  <main>\n    <h1>{{inputs.headline|Deployed from Servus Blueprints}}</h1>\n    <p>Workload: {{workload.name}} ({{domains.primary.host|private}})</p>\n  </main>\n</body>\n</html>\n"
    }
  ],
  "volumes": [],
  "networks": [],
  "services": [
    {
      "name": "web",
      "image": "nginx:1.27.4-alpine",
      "restart": "unless-stopped",
      "resources": {
        "cpus": 0.5,
        "memoryMb": 256
      },
      "expose": [
        80
      ],
      "healthcheck": {
        "test": [
          "CMD-SHELL",
          "wget -qO- http://127.0.0.1/ || exit 1"
        ],
        "interval": "30s",
        "timeout": "5s",
        "retries": 3
      }
    }
  ]
}
