forked from Lissy93/portainer-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Schema.json
112 lines (111 loc) · 3.48 KB
/
Schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "PortainerAppTemplate",
"properties": {
"version": {
"type": "string",
"minLength": 1,
"description": "The version of the Portainer App Template."
},
"templates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "integer",
"minimum": 1,
"maximum": 2,
"description": "The type of the application (1 for container, 2 for swarm stack)."
},
"title": {
"type": "string",
"minLength": 1,
"description": "The title of the application."
},
"description": {
"type": "string",
"minLength": 1,
"description": "A brief description of the application."
},
"categories": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "An array of categories the application belongs to."
},
"platform": {
"type": "string",
"minLength": 1,
"description": "The target platform of the application (e.g., 'linux', 'windows')."
},
"logo": {
"type": "string",
"format": "uri",
"description": "A URI to the logo of the application."
},
"image": {
"type": "string",
"minLength": 1,
"description": "The name of the Docker image used for the application."
},
"restart_policy": {
"type": "string",
"enum": ["always", "unless-stopped", "on-failure", "no"],
"description": "The restart policy for the application."
},
"ports": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9]+:[0-9]+(/tcp|/udp)?$",
"description": "A port mapping in the format 'hostPort:containerPort/protocol'."
},
"description": "An array of port mappings for the application."
},
"volumes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bind": {
"type": "string",
"minLength": 1,
"description": "The host path for the volume binding."
},
"container": {
"type": "string",
"minLength": 1,
"description": "The container path for the volume binding."
}
},
"required": ["bind", "container"]
},
"description": "An array of volume mappings for the application."
},
"environment": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the environment variable."
},
"label": {
"type": "string"
}
}
}
}
},
"required": ["type", "title", "description", "categories", "platform", "logo", "image"]
}
}
},
"required": ["version", "templates"]
}