{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/zerops-io-import/latest.json",
  "x-lintel": {
    "source": "https://api.app-prg1.zerops.io/api/rest/public/settings/import-project-yml-json-schema.json",
    "sourceSha256": "b131267694ff55cdfda66742c84680a762cd743469063e4f793db79886935508",
    "fileMatch": [
      "zerops-import.yaml",
      "zerops-*-import.yaml",
      "zerops-import.yml",
      "zerops-*-import.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "project": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the new project. Duplicates are allowed."
        },
        "description": {
          "type": "string",
          "description": "Description of the new project."
        },
        "corePackage": {
          "type": "string",
          "enum": [
            "LIGHT",
            "SERIOUS"
          ],
          "description": "Project core package.",
          "default": "LIGHT"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "One or more string tags. Tags do not have functional meaning, they only provide better orientation in projects."
        },
        "envVariables": {
          "description": "List of environment variables of project configuration.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "envIsolation": {
          "type": "string",
          "description": "Defines the visibility scope for environment variables. Allowed values: none (no isolation, everyone sees all variables), service (isolation at service level, each service can only see its own variables). Explicit variable referencing is still possible regardless of the isolation setting."
        },
        "sshIsolation": {
          "type": "string",
          "description": "Defines who is authorized to access the service via SSH. Values can be combined using spaces (e.g., project vpn). To exclude a specific access type, use a negative prefix (e.g., -vpn). Allowed values: project (anyone from the project), vpn (anyone from the VPN), service (anyone from the same service), service@name (anyone from the service named \"name\")."
        },
        "sharedIpv4": {
          "type": "boolean",
          "description": "When enabled, project domain includes both AAAA records and an A record pointing to Zerops shared IPv4 address. When disabled, the A record is not defined. If the project has its own dedicated IPv4 address, the domain always contains an A record with this assigned IPv4 address."
        }
      },
      "description": "Only one project can be defined.",
      "type": "object",
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "services": {
      "items": {
        "properties": {
          "hostname": {
            "type": "string",
            "description": "The unique service identifier. Limitations: duplicates in the same project forbidden; maximum 25 characters, lowercase ASCII letters (a-z) or numbers (0-9) only."
          },
          "type": {
            "type": "string",
            "enum": [
              "22.04",
              "3.17",
              "3.18",
              "3.19",
              "3.20",
              "3.21",
              "3.22",
              "3.23",
              "alpine@3.17",
              "alpine@3.18",
              "alpine@3.19",
              "alpine@3.20",
              "alpine@3.21",
              "alpine@3.22",
              "alpine@3.23",
              "bun@1.1",
              "bun@1.1.34",
              "bun@1.2",
              "bun@1.2.2",
              "bun@1.3",
              "bun@1.3.9",
              "bun@canary",
              "bun@latest",
              "bun@nightly",
              "clickhouse@25.3",
              "deno@1",
              "deno@1.45.5",
              "deno@2",
              "deno@2.0.0",
              "deno@latest",
              "docker@26",
              "docker@26.1",
              "docker@26.1.5",
              "docker@latest",
              "dotnet@10",
              "dotnet@6",
              "dotnet@7",
              "dotnet@8",
              "dotnet@9",
              "elasticsearch@8.16",
              "elasticsearch@9.2",
              "elixir@1",
              "elixir@1.16",
              "elixir@1.16.2",
              "gleam@1",
              "gleam@1.5",
              "gleam@1.5.1",
              "go@1",
              "go@1.22",
              "golang@1",
              "golang@1.22",
              "java",
              "java@17",
              "java@21",
              "java@latest",
              "kafka@3.8",
              "kafka@3.9",
              "keydb@6",
              "mariadb@10.6",
              "meilisearch@1.10",
              "meilisearch@1.20",
              "nats@2.10",
              "nats@2.12",
              "nginx@1.22",
              "nginx@latest",
              "nodejs@18",
              "nodejs@20",
              "nodejs@22",
              "nodejs@24",
              "object-storage",
              "objectstorage",
              "php-apache@8.0+2.4",
              "php-apache@8.1",
              "php-apache@8.1+2.4",
              "php-apache@8.3",
              "php-apache@8.3+2.4",
              "php-apache@8.4",
              "php-apache@8.4+2.4",
              "php-apache@8.5",
              "php-apache@8.5+2.4",
              "php-nginx@8.1",
              "php-nginx@8.1+1.22",
              "php-nginx@8.3",
              "php-nginx@8.3+1.22",
              "php-nginx@8.4",
              "php-nginx@8.4+1.22",
              "php-nginx@8.5",
              "php-nginx@8.5+1.28",
              "postgresql@14",
              "postgresql@16",
              "postgresql@17",
              "postgresql@18",
              "python@3.11",
              "python@3.12",
              "python@3.14",
              "python@3.9",
              "qdrant@1.10",
              "qdrant@1.12",
              "rabbitmq@3.9",
              "ruby@3.2",
              "ruby@3.3",
              "ruby@3.4",
              "runtime",
              "rust@1.78",
              "rust@1.80",
              "rust@1.86",
              "rust@nightly",
              "rust@stable",
              "seaweedfs@3",
              "shared-storage",
              "sharedstorage",
              "static",
              "static@1.0",
              "static@latest",
              "typesense@27.1",
              "ubuntu@22.04",
              "ubuntu@24.04",
              "valkey@7.2",
              "zcp@1"
            ],
            "description": "Specifies the service type and version."
          },
          "mode": {
            "type": "string",
            "enum": [
              "HA",
              "NON_HA"
            ],
            "description": "Defines the operation mode of the service."
          },
          "envSecrets": {
            "description": "List of key-value pairs. Environment variables that are blurred by default in Zerops GUI. Can be edited or deleted in Zerops GUI.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "dotEnvSecrets": {
            "type": "string",
            "description": "List of key-value pairs in .env format. Environment variables that are blurred by default in Zerops GUI. Can be edited or deleted in Zerops GUI."
          },
          "nginxConfig": {
            "type": "string",
            "description": "Insert full nginx config."
          },
          "objectStorageSize": {
            "type": "number",
            "description": "Object storage size in GB."
          },
          "objectStoragePolicy": {
            "type": "string",
            "enum": [
              "custom",
              "private",
              "public-read",
              "public-objects-read",
              "public-write",
              "public-read-write"
            ],
            "description": "Select a predefined AWS S3 bucket access policy."
          },
          "objectStorageRawPolicy": {
            "type": "string",
            "description": "Define your own AWS S3 bucket access policy. See AWS docs for details. Use {{ .BucketName }} placeholder if you need to use bucket name in your custom policy rules."
          },
          "buildFromGit": {
            "type": "string",
            "description": "A URL of a Github or Gitlab repository used for a one-time build of your service."
          },
          "startWithoutCode": {
            "type": "boolean",
            "description": "Set true, if you want to start service without code."
          },
          "enableSubdomainAccess": {
            "type": "boolean",
            "description": "Set true, if you want to enable a public access to your service via a Zerops subdomain. Not suitable for production.",
            "default": false
          },
          "priority": {
            "type": "integer",
            "description": "Services are sorted before creation by priority in descending order, i.e. the higher the priority the sooner the service is created."
          },
          "verticalAutoscaling": {
            "properties": {
              "cpu": {
                "type": "integer",
                "description": "Fixed CPU thread count that each container of the service will be set to."
              },
              "ram": {
                "type": "number",
                "description": "Fixed RAM in GB that each container of the service will be set to."
              },
              "disk": {
                "type": "number",
                "description": "Fixed disk space in GB that each container of the service will be set to."
              },
              "cpuMode": {
                "type": "string",
                "enum": [
                  "DEDICATED",
                  "SHARED"
                ],
                "description": "CPU mode that each container of the service will be set to.",
                "default": "SHARED"
              },
              "minCpu": {
                "type": "integer",
                "description": "Minimum CPU thread count that each container of the service can scale down to."
              },
              "maxCpu": {
                "type": "integer",
                "description": "Maximum CPU thread count that each container of the service can scale up to."
              },
              "minRam": {
                "type": "number",
                "description": "Minimum RAM in GB that each container of the service can scale down to."
              },
              "maxRam": {
                "type": "number",
                "description": "Maximum RAM in GB that each container of the service can scale up to."
              },
              "minDisk": {
                "type": "number",
                "description": "Minimum disk space in GB that each container of the service can scale down to."
              },
              "maxDisk": {
                "type": "number",
                "description": "Maximum disk space in GB that each container of the service can scale up to."
              },
              "startCpuCoreCount": {
                "type": "integer",
                "description": "Number of CPU cores with which each container starts."
              },
              "swapEnabled": {
                "type": "boolean",
                "description": "Whether to enable swap memory for containers. Swap is enabled by default. Refer to documentation for more details."
              },
              "minFreeCpuCores": {
                "type": "number",
                "description": "Minimum number of unused CPU cores before a container starts scaling."
              },
              "minFreeCpuPercent": {
                "type": "number",
                "description": "Minimum percentage of unused CPU cores before a container starts scaling."
              },
              "minFreeRamGB": {
                "type": "number",
                "description": "Minimum unused memory in GB before a container starts scaling."
              },
              "minFreeRamPercent": {
                "type": "number",
                "description": "Minimum percentage of unused memory before a container starts scaling."
              },
              "minVCpu": {
                "type": "integer",
                "deprecated": true
              },
              "maxVCpu": {
                "type": "integer",
                "deprecated": true
              }
            },
            "description": "Vertical autoscaling settings.",
            "type": "object",
            "additionalProperties": false
          },
          "minContainers": {
            "type": "integer",
            "maximum": 10,
            "description": "Minimum number of containers of the service.",
            "default": 1
          },
          "maxContainers": {
            "type": "integer",
            "maximum": 10,
            "description": "Maximum number of containers of the service."
          },
          "mount": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Mount shared storages to the service, buildFromGit must be filled."
          },
          "enableCdn": {
            "type": "boolean",
            "description": "Set true, if you want to enable CDN for the object storage bucket. Currently only relevant for object storage services."
          },
          "envIsolation": {
            "type": "string",
            "description": "Defines the visibility scope for environment variables. Allowed values: none (no isolation, everyone sees all variables), service (isolation at service level, each service can only see its own variables). Explicit variable referencing is still possible regardless of the isolation setting. When set at the service level, these values override any project-level defined isolation settings."
          },
          "sshIsolation": {
            "type": "string",
            "description": "Defines who is authorized to access the service via SSH. Values can be combined using spaces (e.g., project vpn). To exclude a specific access type, use a negative prefix (e.g., -vpn). Allowed values: project (anyone from the project), vpn (anyone from the VPN), service (anyone from the same service), service@name (anyone from the service named \"name\"). When set at the service level, these values override any project-level defined isolation settings."
          },
          "os": {
            "type": "string",
            "enum": [
              "alpine",
              "ubuntu"
            ],
            "description": "Optionally specifies the OS of the runtime service imported with 'startWithoutCode=true'."
          },
          "zeropsSetup": {
            "type": "string"
          },
          "zeropsYaml": {
            "properties": {
              "zerops": {
                "items": {
                  "properties": {
                    "setup": {
                      "type": "string",
                      "description": "The first element setup contains the hostname of your service. A runtime service with the same hostname must exist in Zerops. Zerops supports the definition of multiple runtime services in a single zerops.yml. This is useful when you use a monorepo. Just add multiple setup elements in your zerops.yml."
                    },
                    "build": {
                      "properties": {
                        "os": {
                          "type": "string",
                          "description": "Sets the operating system for the runtime environment."
                        },
                        "base": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Sets the base technology for the build environment. If you need to install more technologies to the build environment, set multiple values as a yaml array."
                        },
                        "prepareCommands": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Customises the build environment by installing additional dependencies or tools to the base build environment."
                        },
                        "buildCommands": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Defines build commands. Zerops triggers each command in the defined order in a dedicated build container."
                        },
                        "deploy": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "deployFiles": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use .deployignore file."
                        },
                        "cache": {
                          "properties": {},
                          "description": "Defines which files or folders will be cached for the next build.",
                          "type": "object",
                          "additionalProperties": false
                        },
                        "addToRunPrepare": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Defines what files or folders will be copied from the build container to the prepare runtime container. The prepare runtime container is used to customize your runtime environment."
                        },
                        "envVariables": {
                          "description": "Defines the environment variables for the build environment.",
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "description": "Build pipeline configuration.",
                      "type": "object",
                      "required": [
                        "deployFiles"
                      ],
                      "additionalProperties": false
                    },
                    "deploy": {
                      "properties": {
                        "readinessCheck": {
                          "properties": {
                            "httpGet": {
                              "properties": {
                                "scheme": {
                                  "type": "string",
                                  "description": "The readiness check is triggered from inside of your runtime container so no https is required. If your application requires a https request, set scheme: https"
                                },
                                "host": {
                                  "type": "string",
                                  "description": "The readiness check is triggered from inside of your runtime container so it always uses the localhost (127.0.0.1). If you need to add a host to the request header, specify it in the host attribute."
                                },
                                "port": {
                                  "type": "integer",
                                  "description": "Defines the port of the HTTP GET request."
                                },
                                "path": {
                                  "type": "string",
                                  "description": "Defines the URL path of the HTTP GET request."
                                }
                              },
                              "description": "Configures the readiness check to request a local URL using a http GET method.",
                              "type": "object",
                              "required": [
                                "port",
                                "path"
                              ],
                              "additionalProperties": false
                            },
                            "exec": {
                              "properties": {
                                "command": {
                                  "type": "string",
                                  "description": "Defines a local command to be run. The command has access to the same environment variables. A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below."
                                }
                              },
                              "description": "Configures the readiness check to run a local command.",
                              "type": "object",
                              "required": [
                                "command"
                              ],
                              "additionalProperties": false
                            },
                            "failureTimeout": {
                              "type": "integer",
                              "description": "Time until container is marked as failed."
                            },
                            "retryPeriod": {
                              "type": "integer",
                              "description": "Time interval between readiness check attempts."
                            }
                          },
                          "description": "Defines a readiness check. Requires either httpGet object or exec object.",
                          "type": "object",
                          "additionalProperties": false
                        },
                        "temporaryShutdown": {
                          "type": "boolean"
                        }
                      },
                      "description": "Deploy configuration.",
                      "type": "object",
                      "additionalProperties": false
                    },
                    "run": {
                      "properties": {
                        "initCommands": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Defines one or more commands to be run each time a new runtime container is started or a container is restarted."
                        },
                        "prepareCommands": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "description": "Customises the runtime environment by installing additional dependencies or tools to the base runtime environment."
                        },
                        "os": {
                          "type": "string",
                          "description": "Sets the operating system for the runtime environment."
                        },
                        "base": {
                          "type": "string",
                          "description": "Sets the base technology for the runtime environment. If you don't specify the run.base attribute, Zerops keeps the current version for your runtime."
                        },
                        "start": {
                          "type": "string",
                          "description": "Defines the start command for your application."
                        },
                        "documentRoot": {
                          "type": "string",
                          "description": "Customizes the folder that will be used as the root of the publicly accessible web server content. This attribute is available only for runtimes with webservers."
                        },
                        "siteConfigPath": {
                          "type": "string",
                          "description": "Sets the custom webserver configuration. This attribute is available only for runtimes with webservers."
                        },
                        "envReplace": {
                          "properties": {
                            "target": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "delimiter": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "target",
                            "delimiter"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "healthCheck": {
                          "properties": {
                            "httpGet": {
                              "properties": {
                                "scheme": {
                                  "type": "string",
                                  "description": "The readiness check is triggered from inside of your runtime container so no https is required. If your application requires a https request, set scheme: https"
                                },
                                "host": {
                                  "type": "string",
                                  "description": "The readiness check is triggered from inside of your runtime container so it always uses the localhost (127.0.0.1). If you need to add a host to the request header, specify it in the host attribute."
                                },
                                "port": {
                                  "type": "integer",
                                  "description": "Defines the port of the HTTP GET request."
                                },
                                "path": {
                                  "type": "string",
                                  "description": "Defines the URL path of the HTTP GET request."
                                }
                              },
                              "description": "Configures the health check to request a local URL using a http GET method.",
                              "type": "object",
                              "required": [
                                "port",
                                "path"
                              ],
                              "additionalProperties": false
                            },
                            "exec": {
                              "properties": {
                                "command": {
                                  "type": "string",
                                  "description": "Defines a local command to be run. The command has access to the same environment variables. A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below."
                                }
                              },
                              "description": "Configures the health check to run a local command.",
                              "type": "object",
                              "required": [
                                "command"
                              ],
                              "additionalProperties": false
                            },
                            "failureTimeout": {
                              "type": "integer",
                              "description": "Time until container fails after consecutive health check failures (reset by success)."
                            },
                            "disconnectTimeout": {
                              "type": "integer",
                              "description": "Time until container is disconnected and becomes publicly unavailable."
                            },
                            "recoveryTimeout": {
                              "type": "integer",
                              "description": "Time until container is connected and becomes publicly available."
                            },
                            "execPeriod": {
                              "type": "integer",
                              "description": "Time interval between health check attempts."
                            }
                          },
                          "description": "Defines a health check.",
                          "type": "object",
                          "additionalProperties": false
                        },
                        "routing": {
                          "properties": {
                            "root": {
                              "type": "string"
                            },
                            "cors": {
                              "type": "string",
                              "description": "Content of default Access-Control headers (Allow-Origin, Allow-Methods, Allow-Headers and Expose-Headers), e.g. \"'*' always\""
                            },
                            "redirects": {
                              "items": {
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "description": "Relative or an absolute (defined by with <http://)> path to be matched against request location. May contain * at the end for regex."
                                  },
                                  "to": {
                                    "type": "string",
                                    "description": "Relative or an absolute (defined by with <http://)> path to redirect user to."
                                  },
                                  "status": {
                                    "type": "integer",
                                    "description": "Which HTTP status code to use for the redirect. If not set, and To and From are relative, an internal/masked redirect will be used."
                                  },
                                  "preservePath": {
                                    "type": "boolean",
                                    "description": "Whether part of the path after From should be preserved. Used to forward contents of one directory to another in non-masked redirects."
                                  },
                                  "preserveQuery": {
                                    "type": "boolean",
                                    "description": "Whether query parameters should be preserved. Used in non-masked redirects."
                                  }
                                },
                                "required": [
                                  "from",
                                  "to"
                                ],
                                "type": "object",
                                "additionalProperties": false
                              },
                              "type": "array"
                            },
                            "headers": {
                              "items": {
                                "properties": {
                                  "for": {
                                    "type": "string",
                                    "description": "Relative path to be matched against request location. May contain * at the end for prefix-based match."
                                  },
                                  "values": {
                                    "description": "Header name as Key and raw content as Value, e.g. \"Access-Control-Allow-Origin\": \"'*' always\"",
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": [
                                  "for",
                                  "values"
                                ],
                                "type": "object",
                                "additionalProperties": false
                              },
                              "type": "array"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "ports": {
                          "items": {
                            "properties": {
                              "protocol": {
                                "type": "string",
                                "description": "Defines the protocol. Allowed values are TCP or UDP. Default value is TCP."
                              },
                              "port": {
                                "type": "integer",
                                "description": "Defines the port number. You can set any port number between 10 and 65435. Ports outside this interval are reserved for internal Zerops systems."
                              },
                              "description": {
                                "type": "string"
                              },
                              "httpSupport": {
                                "type": "boolean",
                                "description": "Set to true if a web server is running on the port. Zerops uses this information for the configuration of public access. True is available only in combination with the TCP protocol. Default value is false."
                              }
                            },
                            "required": [
                              "port"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "type": "array",
                          "description": "Specifies one or more internal ports on which your application will listen."
                        },
                        "envVariables": {
                          "description": "Defines the environment variables for the runtime environment.",
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "startCommands": {
                          "items": {
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "command": {
                                "type": "string"
                              },
                              "workingDir": {
                                "type": "string"
                              },
                              "initCommands": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array",
                                "description": "Defines one or more commands to be run each time a new runtime container is started or a container is restarted."
                              }
                            },
                            "required": [
                              "command"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "type": "array",
                          "description": "Defines the start commands for the runtime environment."
                        },
                        "crontab": {
                          "items": {
                            "properties": {
                              "timing": {
                                "type": "string",
                                "description": "Defines when the cron job runs in standard cron format."
                              },
                              "command": {
                                "type": "string",
                                "description": "Specifies the shell command to run at the scheduled time."
                              },
                              "workingDir": {
                                "type": "string",
                                "description": "The directory where the command will be executed (default: /var/www)"
                              },
                              "allContainers": {
                                "type": "boolean",
                                "description": "If set to true, the job runs on all containers; otherwise, it runs on a single container (default: false)"
                              }
                            },
                            "required": [
                              "timing",
                              "command",
                              "allContainers"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "type": "array",
                          "description": "A list of cron jobs with their respective schedule (timing), the command to run (command), and additional options like allContainers and workingDir."
                        }
                      },
                      "description": "Runtime configuration.",
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "setup"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array",
                "description": "The top-level element is always zerops."
              }
            },
            "required": [
              "zerops"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "override": {
            "type": "boolean",
            "description": "Override existing service."
          }
        },
        "required": [
          "hostname",
          "type"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "type": "array"
    }
  },
  "additionalProperties": false
}
