compose_spec.json 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. {
  2. "$schema": "http://json-schema.org/draft/2019-09/schema#",
  3. "id": "compose_spec.json",
  4. "type": "object",
  5. "title": "Compose Specification",
  6. "description": "The Compose file is a YAML file defining a multi-containers based application.",
  7. "properties": {
  8. "version": {
  9. "type": "string",
  10. "description": "Version of the Compose specification used. Tools not implementing required version MUST reject the configuration file."
  11. },
  12. "services": {
  13. "id": "#/properties/services",
  14. "type": "object",
  15. "patternProperties": {
  16. "^[a-zA-Z0-9._-]+$": {
  17. "$ref": "#/definitions/service"
  18. }
  19. },
  20. "additionalProperties": false
  21. },
  22. "networks": {
  23. "id": "#/properties/networks",
  24. "type": "object",
  25. "patternProperties": {
  26. "^[a-zA-Z0-9._-]+$": {
  27. "$ref": "#/definitions/network"
  28. }
  29. }
  30. },
  31. "volumes": {
  32. "id": "#/properties/volumes",
  33. "type": "object",
  34. "patternProperties": {
  35. "^[a-zA-Z0-9._-]+$": {
  36. "$ref": "#/definitions/volume"
  37. }
  38. },
  39. "additionalProperties": false
  40. },
  41. "secrets": {
  42. "id": "#/properties/secrets",
  43. "type": "object",
  44. "patternProperties": {
  45. "^[a-zA-Z0-9._-]+$": {
  46. "$ref": "#/definitions/secret"
  47. }
  48. },
  49. "additionalProperties": false
  50. },
  51. "configs": {
  52. "id": "#/properties/configs",
  53. "type": "object",
  54. "patternProperties": {
  55. "^[a-zA-Z0-9._-]+$": {
  56. "$ref": "#/definitions/config"
  57. }
  58. },
  59. "additionalProperties": false
  60. }
  61. },
  62. "patternProperties": {"^x-": {}},
  63. "additionalProperties": false,
  64. "definitions": {
  65. "service": {
  66. "id": "#/definitions/service",
  67. "type": "object",
  68. "properties": {
  69. "deploy": {"$ref": "#/definitions/deployment"},
  70. "build": {
  71. "oneOf": [
  72. {"type": "string"},
  73. {
  74. "type": "object",
  75. "properties": {
  76. "context": {"type": "string"},
  77. "dockerfile": {"type": "string"},
  78. "args": {"$ref": "#/definitions/list_or_dict"},
  79. "labels": {"$ref": "#/definitions/list_or_dict"},
  80. "cache_from": {"$ref": "#/definitions/list_of_strings"},
  81. "network": {"type": "string"},
  82. "target": {"type": "string"},
  83. "shm_size": {"type": ["integer", "string"]},
  84. "extra_hosts": {"$ref": "#/definitions/list_or_dict"},
  85. "isolation": {"type": "string"}
  86. },
  87. "additionalProperties": false,
  88. "patternProperties": {"^x-": {}}
  89. }
  90. ]
  91. },
  92. "blkio_config": {
  93. "type": "object",
  94. "properties": {
  95. "device_read_bps": {
  96. "type": "array",
  97. "items": {"$ref": "#/definitions/blkio_limit"}
  98. },
  99. "device_read_iops": {
  100. "type": "array",
  101. "items": {"$ref": "#/definitions/blkio_limit"}
  102. },
  103. "device_write_bps": {
  104. "type": "array",
  105. "items": {"$ref": "#/definitions/blkio_limit"}
  106. },
  107. "device_write_iops": {
  108. "type": "array",
  109. "items": {"$ref": "#/definitions/blkio_limit"}
  110. },
  111. "weight": {"type": "integer"},
  112. "weight_device": {
  113. "type": "array",
  114. "items": {"$ref": "#/definitions/blkio_weight"}
  115. }
  116. },
  117. "additionalProperties": false
  118. },
  119. "cap_add": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
  120. "cap_drop": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
  121. "cgroup_parent": {"type": "string"},
  122. "command": {
  123. "oneOf": [
  124. {"type": "string"},
  125. {"type": "array", "items": {"type": "string"}}
  126. ]
  127. },
  128. "configs": {
  129. "type": "array",
  130. "items": {
  131. "oneOf": [
  132. {"type": "string"},
  133. {
  134. "type": "object",
  135. "properties": {
  136. "source": {"type": "string"},
  137. "target": {"type": "string"},
  138. "uid": {"type": "string"},
  139. "gid": {"type": "string"},
  140. "mode": {"type": "number"}
  141. },
  142. "additionalProperties": false,
  143. "patternProperties": {"^x-": {}}
  144. }
  145. ]
  146. }
  147. },
  148. "container_name": {"type": "string"},
  149. "cpu_count": {"type": "integer", "minimum": 0},
  150. "cpu_percent": {"type": "integer", "minimum": 0, "maximum": 100},
  151. "cpu_shares": {"type": ["number", "string"]},
  152. "cpu_quota": {"type": ["number", "string"]},
  153. "cpu_period": {"type": ["number", "string"]},
  154. "cpu_rt_period": {"type": ["number", "string"]},
  155. "cpu_rt_runtime": {"type": ["number", "string"]},
  156. "cpus": {"type": ["number", "string"]},
  157. "cpuset": {"type": "string"},
  158. "credential_spec": {
  159. "type": "object",
  160. "properties": {
  161. "config": {"type": "string"},
  162. "file": {"type": "string"},
  163. "registry": {"type": "string"}
  164. },
  165. "additionalProperties": false,
  166. "patternProperties": {"^x-": {}}
  167. },
  168. "depends_on": {
  169. "oneOf": [
  170. {"$ref": "#/definitions/list_of_strings"},
  171. {
  172. "type": "object",
  173. "additionalProperties": false,
  174. "patternProperties": {
  175. "^[a-zA-Z0-9._-]+$": {
  176. "type": "object",
  177. "additionalProperties": false,
  178. "properties": {
  179. "condition": {
  180. "type": "string",
  181. "enum": ["service_started", "service_healthy"]
  182. }
  183. },
  184. "required": ["condition"]
  185. }
  186. }
  187. }
  188. ]
  189. },
  190. "device_cgroup_rules": {"$ref": "#/definitions/list_of_strings"},
  191. "devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
  192. "dns": {"$ref": "#/definitions/string_or_list"},
  193. "dns_opt": {"type": "array","items": {"type": "string"}, "uniqueItems": true},
  194. "dns_search": {"$ref": "#/definitions/string_or_list"},
  195. "domainname": {"type": "string"},
  196. "entrypoint": {
  197. "oneOf": [
  198. {"type": "string"},
  199. {"type": "array", "items": {"type": "string"}}
  200. ]
  201. },
  202. "env_file": {"$ref": "#/definitions/string_or_list"},
  203. "environment": {"$ref": "#/definitions/list_or_dict"},
  204. "expose": {
  205. "type": "array",
  206. "items": {
  207. "type": ["string", "number"],
  208. "format": "expose"
  209. },
  210. "uniqueItems": true
  211. },
  212. "extends": {
  213. "oneOf": [
  214. {"type": "string"},
  215. {
  216. "type": "object",
  217. "properties": {
  218. "service": {"type": "string"},
  219. "file": {"type": "string"}
  220. },
  221. "required": ["service"],
  222. "additionalProperties": false
  223. }
  224. ]
  225. },
  226. "external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
  227. "extra_hosts": {"$ref": "#/definitions/list_or_dict"},
  228. "group_add": {
  229. "type": "array",
  230. "items": {
  231. "type": ["string", "number"]
  232. },
  233. "uniqueItems": true
  234. },
  235. "healthcheck": {"$ref": "#/definitions/healthcheck"},
  236. "hostname": {"type": "string"},
  237. "image": {"type": "string"},
  238. "init": {"type": "boolean"},
  239. "ipc": {"type": "string"},
  240. "isolation": {"type": "string"},
  241. "labels": {"$ref": "#/definitions/list_or_dict"},
  242. "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
  243. "logging": {
  244. "type": "object",
  245. "properties": {
  246. "driver": {"type": "string"},
  247. "options": {
  248. "type": "object",
  249. "patternProperties": {
  250. "^.+$": {"type": ["string", "number", "null"]}
  251. }
  252. }
  253. },
  254. "additionalProperties": false,
  255. "patternProperties": {"^x-": {}}
  256. },
  257. "mac_address": {"type": "string"},
  258. "mem_limit": {"type": ["number", "string"]},
  259. "mem_reservation": {"type": ["string", "integer"]},
  260. "mem_swappiness": {"type": "integer"},
  261. "memswap_limit": {"type": ["number", "string"]},
  262. "network_mode": {"type": "string"},
  263. "networks": {
  264. "oneOf": [
  265. {"$ref": "#/definitions/list_of_strings"},
  266. {
  267. "type": "object",
  268. "patternProperties": {
  269. "^[a-zA-Z0-9._-]+$": {
  270. "oneOf": [
  271. {
  272. "type": "object",
  273. "properties": {
  274. "aliases": {"$ref": "#/definitions/list_of_strings"},
  275. "ipv4_address": {"type": "string"},
  276. "ipv6_address": {"type": "string"},
  277. "link_local_ips": {"$ref": "#/definitions/list_of_strings"},
  278. "priority": {"type": "number"}
  279. },
  280. "additionalProperties": false,
  281. "patternProperties": {"^x-": {}}
  282. },
  283. {"type": "null"}
  284. ]
  285. }
  286. },
  287. "additionalProperties": false
  288. }
  289. ]
  290. },
  291. "oom_kill_disable": {"type": "boolean"},
  292. "oom_score_adj": {"type": "integer", "minimum": -1000, "maximum": 1000},
  293. "pid": {"type": ["string", "null"]},
  294. "pids_limit": {"type": ["number", "string"]},
  295. "platform": {"type": "string"},
  296. "ports": {
  297. "type": "array",
  298. "items": {
  299. "oneOf": [
  300. {"type": "number", "format": "ports"},
  301. {"type": "string", "format": "ports"},
  302. {
  303. "type": "object",
  304. "properties": {
  305. "mode": {"type": "string"},
  306. "target": {"type": "integer"},
  307. "published": {"type": "integer"},
  308. "protocol": {"type": "string"}
  309. },
  310. "additionalProperties": false,
  311. "patternProperties": {"^x-": {}}
  312. }
  313. ]
  314. },
  315. "uniqueItems": true
  316. },
  317. "privileged": {"type": "boolean"},
  318. "pull_policy": {"type": "string", "enum": [
  319. "always", "never", "if_not_present"
  320. ]},
  321. "read_only": {"type": "boolean"},
  322. "restart": {"type": "string"},
  323. "runtime": {
  324. "deprecated": true,
  325. "type": "string"
  326. },
  327. "scale": {
  328. "type": "integer"
  329. },
  330. "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
  331. "shm_size": {"type": ["number", "string"]},
  332. "secrets": {
  333. "type": "array",
  334. "items": {
  335. "oneOf": [
  336. {"type": "string"},
  337. {
  338. "type": "object",
  339. "properties": {
  340. "source": {"type": "string"},
  341. "target": {"type": "string"},
  342. "uid": {"type": "string"},
  343. "gid": {"type": "string"},
  344. "mode": {"type": "number"}
  345. },
  346. "additionalProperties": false,
  347. "patternProperties": {"^x-": {}}
  348. }
  349. ]
  350. }
  351. },
  352. "sysctls": {"$ref": "#/definitions/list_or_dict"},
  353. "stdin_open": {"type": "boolean"},
  354. "stop_grace_period": {"type": "string", "format": "duration"},
  355. "stop_signal": {"type": "string"},
  356. "tmpfs": {"$ref": "#/definitions/string_or_list"},
  357. "tty": {"type": "boolean"},
  358. "ulimits": {
  359. "type": "object",
  360. "patternProperties": {
  361. "^[a-z]+$": {
  362. "oneOf": [
  363. {"type": "integer"},
  364. {
  365. "type": "object",
  366. "properties": {
  367. "hard": {"type": "integer"},
  368. "soft": {"type": "integer"}
  369. },
  370. "required": ["soft", "hard"],
  371. "additionalProperties": false,
  372. "patternProperties": {"^x-": {}}
  373. }
  374. ]
  375. }
  376. }
  377. },
  378. "user": {"type": "string"},
  379. "userns_mode": {"type": "string"},
  380. "volumes": {
  381. "type": "array",
  382. "items": {
  383. "oneOf": [
  384. {"type": "string"},
  385. {
  386. "type": "object",
  387. "required": ["type"],
  388. "properties": {
  389. "type": {"type": "string"},
  390. "source": {"type": "string"},
  391. "target": {"type": "string"},
  392. "read_only": {"type": "boolean"},
  393. "consistency": {"type": "string"},
  394. "bind": {
  395. "type": "object",
  396. "properties": {
  397. "propagation": {"type": "string"}
  398. },
  399. "additionalProperties": false,
  400. "patternProperties": {"^x-": {}}
  401. },
  402. "volume": {
  403. "type": "object",
  404. "properties": {
  405. "nocopy": {"type": "boolean"}
  406. },
  407. "additionalProperties": false,
  408. "patternProperties": {"^x-": {}}
  409. },
  410. "tmpfs": {
  411. "type": "object",
  412. "properties": {
  413. "size": {
  414. "type": "integer",
  415. "minimum": 0
  416. }
  417. },
  418. "additionalProperties": false,
  419. "patternProperties": {"^x-": {}}
  420. }
  421. },
  422. "additionalProperties": false,
  423. "patternProperties": {"^x-": {}}
  424. }
  425. ]
  426. },
  427. "uniqueItems": true
  428. },
  429. "volumes_from": {
  430. "type": "array",
  431. "items": {"type": "string"},
  432. "uniqueItems": true
  433. },
  434. "working_dir": {"type": "string"}
  435. },
  436. "patternProperties": {"^x-": {}},
  437. "additionalProperties": false
  438. },
  439. "healthcheck": {
  440. "id": "#/definitions/healthcheck",
  441. "type": "object",
  442. "properties": {
  443. "disable": {"type": "boolean"},
  444. "interval": {"type": "string", "format": "duration"},
  445. "retries": {"type": "number"},
  446. "test": {
  447. "oneOf": [
  448. {"type": "string"},
  449. {"type": "array", "items": {"type": "string"}}
  450. ]
  451. },
  452. "timeout": {"type": "string", "format": "duration"},
  453. "start_period": {"type": "string", "format": "duration"}
  454. },
  455. "additionalProperties": false,
  456. "patternProperties": {"^x-": {}}
  457. },
  458. "deployment": {
  459. "id": "#/definitions/deployment",
  460. "type": ["object", "null"],
  461. "properties": {
  462. "mode": {"type": "string"},
  463. "endpoint_mode": {"type": "string"},
  464. "replicas": {"type": "integer"},
  465. "labels": {"$ref": "#/definitions/list_or_dict"},
  466. "rollback_config": {
  467. "type": "object",
  468. "properties": {
  469. "parallelism": {"type": "integer"},
  470. "delay": {"type": "string", "format": "duration"},
  471. "failure_action": {"type": "string"},
  472. "monitor": {"type": "string", "format": "duration"},
  473. "max_failure_ratio": {"type": "number"},
  474. "order": {"type": "string", "enum": [
  475. "start-first", "stop-first"
  476. ]}
  477. },
  478. "additionalProperties": false,
  479. "patternProperties": {"^x-": {}}
  480. },
  481. "update_config": {
  482. "type": "object",
  483. "properties": {
  484. "parallelism": {"type": "integer"},
  485. "delay": {"type": "string", "format": "duration"},
  486. "failure_action": {"type": "string"},
  487. "monitor": {"type": "string", "format": "duration"},
  488. "max_failure_ratio": {"type": "number"},
  489. "order": {"type": "string", "enum": [
  490. "start-first", "stop-first"
  491. ]}
  492. },
  493. "additionalProperties": false,
  494. "patternProperties": {"^x-": {}}
  495. },
  496. "resources": {
  497. "type": "object",
  498. "properties": {
  499. "limits": {
  500. "type": "object",
  501. "properties": {
  502. "cpus": {"type": ["number", "string"]},
  503. "memory": {"type": "string"}
  504. },
  505. "additionalProperties": false,
  506. "patternProperties": {"^x-": {}}
  507. },
  508. "reservations": {
  509. "type": "object",
  510. "properties": {
  511. "cpus": {"type": ["number", "string"]},
  512. "memory": {"type": "string"},
  513. "generic_resources": {"$ref": "#/definitions/generic_resources"},
  514. "devices": {"$ref": "#/definitions/devices"}
  515. },
  516. "additionalProperties": false,
  517. "patternProperties": {"^x-": {}}
  518. }
  519. },
  520. "additionalProperties": false,
  521. "patternProperties": {"^x-": {}}
  522. },
  523. "restart_policy": {
  524. "type": "object",
  525. "properties": {
  526. "condition": {"type": "string"},
  527. "delay": {"type": "string", "format": "duration"},
  528. "max_attempts": {"type": "integer"},
  529. "window": {"type": "string", "format": "duration"}
  530. },
  531. "additionalProperties": false,
  532. "patternProperties": {"^x-": {}}
  533. },
  534. "placement": {
  535. "type": "object",
  536. "properties": {
  537. "constraints": {"type": "array", "items": {"type": "string"}},
  538. "preferences": {
  539. "type": "array",
  540. "items": {
  541. "type": "object",
  542. "properties": {
  543. "spread": {"type": "string"}
  544. },
  545. "additionalProperties": false,
  546. "patternProperties": {"^x-": {}}
  547. }
  548. },
  549. "max_replicas_per_node": {"type": "integer"}
  550. },
  551. "additionalProperties": false,
  552. "patternProperties": {"^x-": {}}
  553. }
  554. },
  555. "additionalProperties": false,
  556. "patternProperties": {"^x-": {}}
  557. },
  558. "generic_resources": {
  559. "id": "#/definitions/generic_resources",
  560. "type": "array",
  561. "items": {
  562. "type": "object",
  563. "properties": {
  564. "discrete_resource_spec": {
  565. "type": "object",
  566. "properties": {
  567. "kind": {"type": "string"},
  568. "value": {"type": "number"}
  569. },
  570. "additionalProperties": false,
  571. "patternProperties": {"^x-": {}}
  572. }
  573. },
  574. "additionalProperties": false,
  575. "patternProperties": {"^x-": {}}
  576. }
  577. },
  578. "devices": {
  579. "id": "#/definitions/devices",
  580. "type": "array",
  581. "items": {
  582. "type": "object",
  583. "properties": {
  584. "capabilities": {"$ref": "#/definitions/list_of_strings"},
  585. "count": {"type": ["string", "integer"]},
  586. "device_ids": {"$ref": "#/definitions/list_of_strings"},
  587. "driver":{"type": "string"},
  588. "options":{"$ref": "#/definitions/list_or_dict"}
  589. },
  590. "additionalProperties": false,
  591. "patternProperties": {"^x-": {}}
  592. }
  593. },
  594. "network": {
  595. "id": "#/definitions/network",
  596. "type": ["object", "null"],
  597. "properties": {
  598. "name": {"type": "string"},
  599. "driver": {"type": "string"},
  600. "driver_opts": {
  601. "type": "object",
  602. "patternProperties": {
  603. "^.+$": {"type": ["string", "number"]}
  604. }
  605. },
  606. "ipam": {
  607. "type": "object",
  608. "properties": {
  609. "driver": {"type": "string"},
  610. "config": {
  611. "type": "array",
  612. "items": {
  613. "type": "object",
  614. "properties": {
  615. "subnet": {"type": "string", "format": "subnet_ip_address"},
  616. "ip_range": {"type": "string"},
  617. "gateway": {"type": "string"},
  618. "aux_addresses": {
  619. "type": "object",
  620. "additionalProperties": false,
  621. "patternProperties": {"^.+$": {"type": "string"}}
  622. }
  623. },
  624. "additionalProperties": false,
  625. "patternProperties": {"^x-": {}}
  626. }
  627. },
  628. "options": {
  629. "type": "object",
  630. "additionalProperties": false,
  631. "patternProperties": {"^.+$": {"type": "string"}}
  632. }
  633. },
  634. "additionalProperties": false,
  635. "patternProperties": {"^x-": {}}
  636. },
  637. "external": {
  638. "type": ["boolean", "object"],
  639. "properties": {
  640. "name": {
  641. "deprecated": true,
  642. "type": "string"
  643. }
  644. },
  645. "additionalProperties": false,
  646. "patternProperties": {"^x-": {}}
  647. },
  648. "internal": {"type": "boolean"},
  649. "enable_ipv6": {"type": "boolean"},
  650. "attachable": {"type": "boolean"},
  651. "labels": {"$ref": "#/definitions/list_or_dict"}
  652. },
  653. "additionalProperties": false,
  654. "patternProperties": {"^x-": {}}
  655. },
  656. "volume": {
  657. "id": "#/definitions/volume",
  658. "type": ["object", "null"],
  659. "properties": {
  660. "name": {"type": "string"},
  661. "driver": {"type": "string"},
  662. "driver_opts": {
  663. "type": "object",
  664. "patternProperties": {
  665. "^.+$": {"type": ["string", "number"]}
  666. }
  667. },
  668. "external": {
  669. "type": ["boolean", "object"],
  670. "properties": {
  671. "name": {
  672. "deprecated": true,
  673. "type": "string"
  674. }
  675. },
  676. "additionalProperties": false,
  677. "patternProperties": {"^x-": {}}
  678. },
  679. "labels": {"$ref": "#/definitions/list_or_dict"}
  680. },
  681. "additionalProperties": false,
  682. "patternProperties": {"^x-": {}}
  683. },
  684. "secret": {
  685. "id": "#/definitions/secret",
  686. "type": "object",
  687. "properties": {
  688. "name": {"type": "string"},
  689. "file": {"type": "string"},
  690. "external": {
  691. "type": ["boolean", "object"],
  692. "properties": {
  693. "name": {"type": "string"}
  694. }
  695. },
  696. "labels": {"$ref": "#/definitions/list_or_dict"},
  697. "driver": {"type": "string"},
  698. "driver_opts": {
  699. "type": "object",
  700. "patternProperties": {
  701. "^.+$": {"type": ["string", "number"]}
  702. }
  703. },
  704. "template_driver": {"type": "string"}
  705. },
  706. "additionalProperties": false,
  707. "patternProperties": {"^x-": {}}
  708. },
  709. "config": {
  710. "id": "#/definitions/config",
  711. "type": "object",
  712. "properties": {
  713. "name": {"type": "string"},
  714. "file": {"type": "string"},
  715. "external": {
  716. "type": ["boolean", "object"],
  717. "properties": {
  718. "name": {
  719. "deprecated": true,
  720. "type": "string"
  721. }
  722. }
  723. },
  724. "labels": {"$ref": "#/definitions/list_or_dict"},
  725. "template_driver": {"type": "string"}
  726. },
  727. "additionalProperties": false,
  728. "patternProperties": {"^x-": {}}
  729. },
  730. "string_or_list": {
  731. "oneOf": [
  732. {"type": "string"},
  733. {"$ref": "#/definitions/list_of_strings"}
  734. ]
  735. },
  736. "list_of_strings": {
  737. "type": "array",
  738. "items": {"type": "string"},
  739. "uniqueItems": true
  740. },
  741. "list_or_dict": {
  742. "oneOf": [
  743. {
  744. "type": "object",
  745. "patternProperties": {
  746. ".+": {
  747. "type": ["string", "number", "null"]
  748. }
  749. },
  750. "additionalProperties": false
  751. },
  752. {"type": "array", "items": {"type": "string"}, "uniqueItems": true}
  753. ]
  754. },
  755. "blkio_limit": {
  756. "type": "object",
  757. "properties": {
  758. "path": {"type": "string"},
  759. "rate": {"type": ["integer", "string"]}
  760. },
  761. "additionalProperties": false
  762. },
  763. "blkio_weight": {
  764. "type": "object",
  765. "properties": {
  766. "path": {"type": "string"},
  767. "weight": {"type": "integer"}
  768. },
  769. "additionalProperties": false
  770. },
  771. "constraints": {
  772. "service": {
  773. "id": "#/definitions/constraints/service",
  774. "anyOf": [
  775. {"required": ["build"]},
  776. {"required": ["image"]}
  777. ],
  778. "properties": {
  779. "build": {
  780. "required": ["context"]
  781. }
  782. }
  783. }
  784. }
  785. }
  786. }