all-in-one/php/containers-schema.json
Simon L 20c3fbc154 add it to jscon schema
Signed-off-by: Simon L <szaimen@e.mail.de>
2024-03-01 18:31:49 +01:00

198 lines
No EOL
4.1 KiB
JSON

{
"type": "object",
"description": "AIO containers definition schema",
"minProperties": 1,
"required": ["aio_services_v1"],
"properties": {
"aio_services_v1": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 2,
"required": ["image", "container_name", "image_tag"],
"properties": {
"image": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z0-9/-]+$"
},
"expose": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9]{1,5})$"
}
},
"cap_add": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z_]+$"
}
},
"cap_drop": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z_]+$"
}
},
"depends_on": {
"type": "array",
"items": {
"type": "string",
"pattern": "^nextcloud-aio-[a-z-]+$"
}
},
"display_name": {
"type": "string",
"pattern": "^[A-Za-z 0-9-]+$"
},
"environment": {
"type": "array",
"items": {
"type": "string",
"pattern": "^.*=.*$",
"minlength": 1
}
},
"container_name": {
"type": "string",
"pattern": "^nextcloud-aio-[a-z0-9-]+$"
},
"internal_port": {
"type": "string",
"pattern": "^(([0-9]{1,5})|host|(%[A-Z_]+%))$"
},
"stop_grace_period": {
"type": "integer"
},
"ports": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 3,
"properties": {
"ip_binding": {
"type": "string",
"pattern": "^(%[A-Z_]+%)?$"
},
"port_number": {
"type": "string",
"pattern": "^(%[A-Z_]+%|[0-9]{1,5})$"
},
"protocol": {
"type": "string",
"pattern": "^(tcp|udp)$"
}
}
}
},
"aio_variables": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z_a-z-]+=.*$"
}
},
"restart": {
"type": "string",
"pattern": "^unless-stopped$"
},
"shm_size": {
"type": "integer"
},
"secrets": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z_]+$"
}
},
"image_tag": {
"type": "string",
"pattern": "^([a-z0-9.-]+|%AIO_CHANNEL%)$"
},
"documentation": {
"type": "string",
"pattern": "^https://.*$"
},
"devices": {
"type": "array",
"items": {
"type": "string",
"pattern": "^/dev/[a-z]+$"
}
},
"apparmor_unconfined": {
"type": "boolean"
},
"backup_volumes": {
"type": "array",
"items": {
"type": "string",
"pattern": "^nextcloud_aio_[a-z_]+$"
}
},
"nextcloud_exec_commands": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(php /var/www/html/occ .*|echo .*|touch .*|mkdir .*)$"
}
},
"profiles": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z-]+$"
}
},
"networks": {
"type": "array",
"items": {
"type": "string",
"pattern": "^nextcloud-aio$"
}
},
"read_only": {
"type": "boolean"
},
"init": {
"type": "boolean"
},
"tmpfs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^/[a-z/_0-9-:]+$"
}
},
"volumes": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 3,
"properties": {
"destination": {
"type": "string",
"pattern": "^((/[a-z_/.-]+)|(%[A-Z_]+%))$"
},
"source": {
"type": "string",
"pattern": "^((nextcloud_aio_[a-z_]+)|(%[A-Z_]+%))$"
},
"writeable": {
"type": "boolean"
}
}
}
}
}
}
}
}
}