-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathSchema.json
More file actions
235 lines (235 loc) · 7.72 KB
/
Schema.json
File metadata and controls
235 lines (235 loc) · 7.72 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "PortainerAppTemplateV3",
"properties": {
"version": {
"type": "string",
"const": "3",
"description": "The version of the Portainer App Template."
},
"templates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": 1,
"description": "Unique identifier for the template."
},
"type": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "The type of the application (1=container, 2=swarm stack, 3=compose stack, 4=kubernetes)."
},
"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",
"minLength": 1
},
"description": "An array of port mappings for the application."
},
"volumes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"container": {
"type": "string",
"minLength": 1,
"description": "The container path for the volume binding."
},
"bind": {
"type": "string",
"description": "The host path for the volume binding."
},
"readonly": {
"type": "boolean",
"description": "Whether the volume is read-only."
}
},
"required": ["container"]
},
"description": "An array of volume mappings for the application."
},
"env": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the environment variable."
},
"label": {
"type": "string",
"description": "Display label for the environment variable."
},
"description": {
"type": "string",
"description": "Description of the environment variable."
},
"default": {
"type": "string",
"description": "The default value for the environment variable."
},
"preset": {
"type": "boolean",
"description": "When true, the variable is applied silently with its default value."
},
"select": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": { "type": "string" },
"value": { "type": "string" },
"default": { "type": "boolean" }
},
"required": ["text", "value"]
},
"description": "Dropdown options for the environment variable."
}
},
"required": ["name"]
},
"description": "Environment variables for the template."
},
"labels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string",
"minLength": 1
}
},
"required": ["name", "value"]
},
"description": "Docker labels for the template."
},
"repository": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "URL of the git repository."
},
"stackfile": {
"type": "string",
"minLength": 1,
"description": "Path to the stack file within the repository."
}
},
"required": ["url", "stackfile"],
"description": "Repository details for stack templates (types 2 and 3)."
},
"note": {
"type": "string",
"description": "Usage or deployment notes (supports HTML)."
},
"name": {
"type": "string",
"description": "Default name for the stack/container."
},
"administrator_only": {
"type": "boolean",
"description": "Whether the template is only available to administrators."
},
"registry": {
"type": "string",
"description": "Registry to pull the image from."
},
"command": {
"type": "string",
"description": "Command to run in the container."
},
"network": {
"type": "string",
"description": "Network to attach the container to."
},
"privileged": {
"type": "boolean",
"description": "Whether to run the container in privileged mode."
},
"interactive": {
"type": "boolean",
"description": "Whether the container requires an interactive shell."
},
"hostname": {
"type": "string",
"description": "Hostname for the container."
},
"stackFile": {
"type": "string",
"description": "Inline stack file content. When present, Portainer uses this directly instead of cloning the repository."
}
},
"required": ["id", "type", "title", "description"],
"allOf": [
{
"if": { "properties": { "type": { "const": 1 } } },
"then": { "required": ["image"] }
},
{
"if": { "properties": { "type": { "const": 2 } } },
"then": { "required": ["repository"] }
},
{
"if": { "properties": { "type": { "const": 3 } } },
"then": { "required": ["repository"] }
}
]
}
}
},
"required": ["version", "templates"]
}