{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "mm configuration: stacks",
  "type": "object",
  "$comment": "The value of top-level 'stacks', for .config/mm/stacks.yaml. Generated from MmConfig; run ./scripts/generate-artifacts.sh. Do not edit.",
  "additionalProperties": {
    "$ref": "#/$defs/StackConfig"
  },
  "$defs": {
    "IngressConfig": {
      "anyOf": [
        {
          "$ref": "#/$defs/IngressRouteConfig"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IngressRouteConfig"
          }
        }
      ]
    },
    "IngressRouteConfig": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string"
        },
        "environments": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "https": {
          "type": "boolean",
          "default": true
        },
        "port": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0
        },
        "route": {
          "type": "string",
          "default": "/"
        },
        "service": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "domain"
      ]
    },
    "StackConfig": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ingress": {
          "$ref": "#/$defs/IngressConfig"
        },
        "networks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "project-name": {
          "type": [
            "string",
            "null"
          ]
        },
        "shared-volumes": {
          "description": "Compose volume keys that every node can mount. On a multi-node Swarm\nthey live on mm's built-in shared storage; elsewhere they are ordinary volumes.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "files"
      ]
    }
  }
}
