|
13 | 13 |
|
14 | 14 | "name": {
|
15 | 15 | "type": "string",
|
16 |
| - "pattern": "^[a-z0-9][a-z0-9_-]*$", |
17 | 16 | "description": "define the Compose project name, until user defines one explicitly."
|
18 | 17 | },
|
19 | 18 |
|
|
94 | 93 | "develop": {"$ref": "#/definitions/development"},
|
95 | 94 | "deploy": {"$ref": "#/definitions/deployment"},
|
96 | 95 | "annotations": {"$ref": "#/definitions/list_or_dict"},
|
97 |
| - "attach": {"type": "boolean"}, |
| 96 | + "attach": {"type": ["boolean", "string"]}, |
98 | 97 | "build": {
|
99 | 98 | "oneOf": [
|
100 | 99 | {"type": "string"},
|
|
110 | 109 | "labels": {"$ref": "#/definitions/list_or_dict"},
|
111 | 110 | "cache_from": {"type": "array", "items": {"type": "string"}},
|
112 | 111 | "cache_to": {"type": "array", "items": {"type": "string"}},
|
113 |
| - "no_cache": {"type": "boolean"}, |
| 112 | + "no_cache": {"type": ["boolean", "string"]}, |
114 | 113 | "additional_contexts": {"$ref": "#/definitions/list_or_dict"},
|
115 | 114 | "network": {"type": "string"},
|
116 |
| - "pull": {"type": "boolean"}, |
| 115 | + "pull": {"type": ["boolean", "string"]}, |
117 | 116 | "target": {"type": "string"},
|
118 | 117 | "shm_size": {"type": ["integer", "string"]},
|
119 | 118 | "extra_hosts": {"$ref": "#/definitions/list_or_dict"},
|
120 | 119 | "isolation": {"type": "string"},
|
121 |
| - "privileged": {"type": "boolean"}, |
| 120 | + "privileged": {"type": ["boolean", "string"]}, |
122 | 121 | "secrets": {"$ref": "#/definitions/service_config_or_secret"},
|
123 | 122 | "tags": {"type": "array", "items": {"type": "string"}},
|
124 | 123 | "ulimits": {"$ref": "#/definitions/ulimits"},
|
|
148 | 147 | "type": "array",
|
149 | 148 | "items": {"$ref": "#/definitions/blkio_limit"}
|
150 | 149 | },
|
151 |
| - "weight": {"type": "integer"}, |
| 150 | + "weight": {"type": ["integer", "string"]}, |
152 | 151 | "weight_device": {
|
153 | 152 | "type": "array",
|
154 | 153 | "items": {"$ref": "#/definitions/blkio_weight"}
|
|
163 | 162 | "command": {"$ref": "#/definitions/command"},
|
164 | 163 | "configs": {"$ref": "#/definitions/service_config_or_secret"},
|
165 | 164 | "container_name": {"type": "string"},
|
166 |
| - "cpu_count": {"type": "integer", "minimum": 0}, |
167 |
| - "cpu_percent": {"type": "integer", "minimum": 0, "maximum": 100}, |
| 165 | + "cpu_count": {"oneOf": [ |
| 166 | + {"type": "string"}, |
| 167 | + {"type": "integer", "minimum": 0} |
| 168 | + ]}, |
| 169 | + "cpu_percent": {"oneOf": [ |
| 170 | + {"type": "string"}, |
| 171 | + {"type": "integer", "minimum": 0, "maximum": 100} |
| 172 | + ]}, |
168 | 173 | "cpu_shares": {"type": ["number", "string"]},
|
169 | 174 | "cpu_quota": {"type": ["number", "string"]},
|
170 | 175 | "cpu_period": {"type": ["number", "string"]},
|
|
193 | 198 | "type": "object",
|
194 | 199 | "additionalProperties": false,
|
195 | 200 | "properties": {
|
196 |
| - "restart": {"type": "boolean"}, |
| 201 | + "restart": {"type": ["boolean", "string"]}, |
197 | 202 | "required": {
|
198 | 203 | "type": "boolean",
|
199 | 204 | "default": true
|
|
254 | 259 | "healthcheck": {"$ref": "#/definitions/healthcheck"},
|
255 | 260 | "hostname": {"type": "string"},
|
256 | 261 | "image": {"type": "string"},
|
257 |
| - "init": {"type": "boolean"}, |
| 262 | + "init": {"type": ["boolean", "string"]}, |
258 | 263 | "ipc": {"type": "string"},
|
259 | 264 | "isolation": {"type": "string"},
|
260 | 265 | "labels": {"$ref": "#/definitions/list_or_dict"},
|
|
277 | 282 | "mac_address": {"type": "string"},
|
278 | 283 | "mem_limit": {"type": ["number", "string"]},
|
279 | 284 | "mem_reservation": {"type": ["string", "integer"]},
|
280 |
| - "mem_swappiness": {"type": "integer"}, |
| 285 | + "mem_swappiness": {"type": ["integer", "string"]}, |
281 | 286 | "memswap_limit": {"type": ["number", "string"]},
|
282 | 287 | "network_mode": {"type": "string"},
|
283 | 288 | "networks": {
|
|
315 | 320 | }
|
316 | 321 | ]
|
317 | 322 | },
|
318 |
| - "oom_kill_disable": {"type": "boolean"}, |
319 |
| - "oom_score_adj": {"type": "integer", "minimum": -1000, "maximum": 1000}, |
| 323 | + "oom_kill_disable": {"type": ["boolean", "string"]}, |
| 324 | + "oom_score_adj": {"oneOf": [ |
| 325 | + {"type": "string"}, |
| 326 | + {"type": "integer", "minimum": -1000, "maximum": 1000} |
| 327 | + ]}, |
320 | 328 | "pid": {"type": ["string", "null"]},
|
321 | 329 | "pids_limit": {"type": ["number", "string"]},
|
322 | 330 | "platform": {"type": "string"},
|
323 | 331 | "ports": {
|
324 | 332 | "type": "array",
|
325 | 333 | "items": {
|
326 | 334 | "oneOf": [
|
327 |
| - {"type": "number", "format": "ports"}, |
328 |
| - {"type": "string", "format": "ports"}, |
| 335 | + {"type": "number"}, |
| 336 | + {"type": "string"}, |
329 | 337 | {
|
330 | 338 | "type": "object",
|
331 | 339 | "properties": {
|
332 | 340 | "name": {"type": "string"},
|
333 | 341 | "mode": {"type": "string"},
|
334 | 342 | "host_ip": {"type": "string"},
|
335 |
| - "target": {"type": "integer"}, |
| 343 | + "target": {"type": ["integer", "string"]}, |
336 | 344 | "published": {"type": ["string", "integer"]},
|
337 | 345 | "protocol": {"type": "string"},
|
338 | 346 | "app_protocol": {"type": "string"}
|
|
344 | 352 | },
|
345 | 353 | "uniqueItems": true
|
346 | 354 | },
|
347 |
| - "privileged": {"type": "boolean"}, |
| 355 | + "privileged": {"type": ["boolean", "string"]}, |
348 | 356 | "profiles": {"$ref": "#/definitions/list_of_strings"},
|
349 | 357 | "pull_policy": {"type": "string", "enum": [
|
350 | 358 | "always", "never", "if_not_present", "build", "missing"
|
351 | 359 | ]},
|
352 |
| - "read_only": {"type": "boolean"}, |
| 360 | + "read_only": {"type": ["boolean", "string"]}, |
353 | 361 | "restart": {"type": "string"},
|
354 | 362 | "runtime": {
|
355 | 363 | "type": "string"
|
356 | 364 | },
|
357 | 365 | "scale": {
|
358 |
| - "type": "integer" |
| 366 | + "type": ["integer", "string"] |
359 | 367 | },
|
360 | 368 | "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
361 | 369 | "shm_size": {"type": ["number", "string"]},
|
362 | 370 | "secrets": {"$ref": "#/definitions/service_config_or_secret"},
|
363 | 371 | "sysctls": {"$ref": "#/definitions/list_or_dict"},
|
364 |
| - "stdin_open": {"type": "boolean"}, |
365 |
| - "stop_grace_period": {"type": "string", "format": "duration"}, |
| 372 | + "stdin_open": {"type": ["boolean", "string"]}, |
| 373 | + "stop_grace_period": {"type": "string"}, |
366 | 374 | "stop_signal": {"type": "string"},
|
367 | 375 | "storage_opt": {"type": "object"},
|
368 | 376 | "tmpfs": {"$ref": "#/definitions/string_or_list"},
|
369 |
| - "tty": {"type": "boolean"}, |
| 377 | + "tty": {"type": ["boolean", "string"]}, |
370 | 378 | "ulimits": {"$ref": "#/definitions/ulimits"},
|
371 | 379 | "user": {"type": "string"},
|
372 | 380 | "uts": {"type": "string"},
|
|
383 | 391 | "type": {"type": "string"},
|
384 | 392 | "source": {"type": "string"},
|
385 | 393 | "target": {"type": "string"},
|
386 |
| - "read_only": {"type": "boolean"}, |
| 394 | + "read_only": {"type": ["boolean", "string"]}, |
387 | 395 | "consistency": {"type": "string"},
|
388 | 396 | "bind": {
|
389 | 397 | "type": "object",
|
390 | 398 | "properties": {
|
391 | 399 | "propagation": {"type": "string"},
|
392 |
| - "create_host_path": {"type": "boolean"}, |
| 400 | + "create_host_path": {"type": ["boolean", "string"]}, |
393 | 401 | "selinux": {"type": "string", "enum": ["z", "Z"]}
|
394 | 402 | },
|
395 | 403 | "additionalProperties": false,
|
|
398 | 406 | "volume": {
|
399 | 407 | "type": "object",
|
400 | 408 | "properties": {
|
401 |
| - "nocopy": {"type": "boolean"}, |
| 409 | + "nocopy": {"type": ["boolean", "string"]}, |
402 | 410 | "subpath": {"type": "string"}
|
403 | 411 | },
|
404 | 412 | "additionalProperties": false,
|
|
413 | 421 | {"type": "string"}
|
414 | 422 | ]
|
415 | 423 | },
|
416 |
| - "mode": {"type": "number"} |
| 424 | + "mode": {"type": ["number", "string"]} |
417 | 425 | },
|
418 | 426 | "additionalProperties": false,
|
419 | 427 | "patternProperties": {"^x-": {}}
|
|
441 | 449 | "id": "#/definitions/healthcheck",
|
442 | 450 | "type": "object",
|
443 | 451 | "properties": {
|
444 |
| - "disable": {"type": "boolean"}, |
445 |
| - "interval": {"type": "string", "format": "duration"}, |
446 |
| - "retries": {"type": "number"}, |
| 452 | + "disable": {"type": ["boolean", "string"]}, |
| 453 | + "interval": {"type": "string"}, |
| 454 | + "retries": {"type": ["number", "string"]}, |
447 | 455 | "test": {
|
448 | 456 | "oneOf": [
|
449 | 457 | {"type": "string"},
|
450 | 458 | {"type": "array", "items": {"type": "string"}}
|
451 | 459 | ]
|
452 | 460 | },
|
453 |
| - "timeout": {"type": "string", "format": "duration"}, |
454 |
| - "start_period": {"type": "string", "format": "duration"}, |
455 |
| - "start_interval": {"type": "string", "format": "duration"} |
| 461 | + "timeout": {"type": "string"}, |
| 462 | + "start_period": {"type": "string"}, |
| 463 | + "start_interval": {"type": "string"} |
456 | 464 | },
|
457 | 465 | "additionalProperties": false,
|
458 | 466 | "patternProperties": {"^x-": {}}
|
|
484 | 492 | "properties": {
|
485 | 493 | "mode": {"type": "string"},
|
486 | 494 | "endpoint_mode": {"type": "string"},
|
487 |
| - "replicas": {"type": "integer"}, |
| 495 | + "replicas": {"type": ["integer", "string"]}, |
488 | 496 | "labels": {"$ref": "#/definitions/list_or_dict"},
|
489 | 497 | "rollback_config": {
|
490 | 498 | "type": "object",
|
491 | 499 | "properties": {
|
492 |
| - "parallelism": {"type": "integer"}, |
493 |
| - "delay": {"type": "string", "format": "duration"}, |
| 500 | + "parallelism": {"type": ["integer", "string"]}, |
| 501 | + "delay": {"type": "string"}, |
494 | 502 | "failure_action": {"type": "string"},
|
495 |
| - "monitor": {"type": "string", "format": "duration"}, |
496 |
| - "max_failure_ratio": {"type": "number"}, |
| 503 | + "monitor": {"type": "string"}, |
| 504 | + "max_failure_ratio": {"type": ["number", "string"]}, |
497 | 505 | "order": {"type": "string", "enum": [
|
498 | 506 | "start-first", "stop-first"
|
499 | 507 | ]}
|
|
504 | 512 | "update_config": {
|
505 | 513 | "type": "object",
|
506 | 514 | "properties": {
|
507 |
| - "parallelism": {"type": "integer"}, |
508 |
| - "delay": {"type": "string", "format": "duration"}, |
| 515 | + "parallelism": {"type": ["integer", "string"]}, |
| 516 | + "delay": {"type": "string"}, |
509 | 517 | "failure_action": {"type": "string"},
|
510 |
| - "monitor": {"type": "string", "format": "duration"}, |
511 |
| - "max_failure_ratio": {"type": "number"}, |
| 518 | + "monitor": {"type": "string"}, |
| 519 | + "max_failure_ratio": {"type": ["number", "string"]}, |
512 | 520 | "order": {"type": "string", "enum": [
|
513 | 521 | "start-first", "stop-first"
|
514 | 522 | ]}
|
|
524 | 532 | "properties": {
|
525 | 533 | "cpus": {"type": ["number", "string"]},
|
526 | 534 | "memory": {"type": "string"},
|
527 |
| - "pids": {"type": "integer"} |
| 535 | + "pids": {"type": ["integer", "string"]} |
528 | 536 | },
|
529 | 537 | "additionalProperties": false,
|
530 | 538 | "patternProperties": {"^x-": {}}
|
|
548 | 556 | "type": "object",
|
549 | 557 | "properties": {
|
550 | 558 | "condition": {"type": "string"},
|
551 |
| - "delay": {"type": "string", "format": "duration"}, |
552 |
| - "max_attempts": {"type": "integer"}, |
553 |
| - "window": {"type": "string", "format": "duration"} |
| 559 | + "delay": {"type": "string"}, |
| 560 | + "max_attempts": {"type": ["integer", "string"]}, |
| 561 | + "window": {"type": "string"} |
554 | 562 | },
|
555 | 563 | "additionalProperties": false,
|
556 | 564 | "patternProperties": {"^x-": {}}
|
|
570 | 578 | "patternProperties": {"^x-": {}}
|
571 | 579 | }
|
572 | 580 | },
|
573 |
| - "max_replicas_per_node": {"type": "integer"} |
| 581 | + "max_replicas_per_node": {"type": ["integer", "string"]} |
574 | 582 | },
|
575 | 583 | "additionalProperties": false,
|
576 | 584 | "patternProperties": {"^x-": {}}
|
|
590 | 598 | "type": "object",
|
591 | 599 | "properties": {
|
592 | 600 | "kind": {"type": "string"},
|
593 |
| - "value": {"type": "number"} |
| 601 | + "value": {"type": ["number", "string"]} |
594 | 602 | },
|
595 | 603 | "additionalProperties": false,
|
596 | 604 | "patternProperties": {"^x-": {}}
|
|
655 | 663 | "items": {
|
656 | 664 | "type": "object",
|
657 | 665 | "properties": {
|
658 |
| - "subnet": {"type": "string", "format": "subnet_ip_address"}, |
| 666 | + "subnet": {"type": "string"}, |
659 | 667 | "ip_range": {"type": "string"},
|
660 | 668 | "gateway": {"type": "string"},
|
661 | 669 | "aux_addresses": {
|
|
678 | 686 | "patternProperties": {"^x-": {}}
|
679 | 687 | },
|
680 | 688 | "external": {
|
681 |
| - "type": ["boolean", "object"], |
| 689 | + "type": ["boolean", "string", "object"], |
682 | 690 | "properties": {
|
683 | 691 | "name": {
|
684 | 692 | "deprecated": true,
|
|
688 | 696 | "additionalProperties": false,
|
689 | 697 | "patternProperties": {"^x-": {}}
|
690 | 698 | },
|
691 |
| - "internal": {"type": "boolean"}, |
692 |
| - "enable_ipv6": {"type": "boolean"}, |
693 |
| - "attachable": {"type": "boolean"}, |
| 699 | + "internal": {"type": ["boolean", "string"]}, |
| 700 | + "enable_ipv6": {"type": ["boolean", "string"]}, |
| 701 | + "attachable": {"type": ["boolean", "string"]}, |
694 | 702 | "labels": {"$ref": "#/definitions/list_or_dict"}
|
695 | 703 | },
|
696 | 704 | "additionalProperties": false,
|
|
710 | 718 | }
|
711 | 719 | },
|
712 | 720 | "external": {
|
713 |
| - "type": ["boolean", "object"], |
| 721 | + "type": ["boolean", "string", "object"], |
714 | 722 | "properties": {
|
715 | 723 | "name": {
|
716 | 724 | "deprecated": true,
|
|
734 | 742 | "environment": {"type": "string"},
|
735 | 743 | "file": {"type": "string"},
|
736 | 744 | "external": {
|
737 |
| - "type": ["boolean", "object"], |
| 745 | + "type": ["boolean", "string", "object"], |
738 | 746 | "properties": {
|
739 | 747 | "name": {"type": "string"}
|
740 | 748 | }
|
|
762 | 770 | "environment": {"type": "string"},
|
763 | 771 | "file": {"type": "string"},
|
764 | 772 | "external": {
|
765 |
| - "type": ["boolean", "object"], |
| 773 | + "type": ["boolean", "string", "object"], |
766 | 774 | "properties": {
|
767 | 775 | "name": {
|
768 | 776 | "deprecated": true,
|
|
801 | 809 | "type": "string"
|
802 | 810 | },
|
803 | 811 | "required": {
|
804 |
| - "type": "boolean", |
| 812 | + "type": ["boolean", "string"], |
805 | 813 | "default": true
|
806 | 814 | }
|
807 | 815 | },
|
|
855 | 863 | "type": "object",
|
856 | 864 | "properties": {
|
857 | 865 | "path": {"type": "string"},
|
858 |
| - "weight": {"type": "integer"} |
| 866 | + "weight": {"type": ["integer", "string"]} |
859 | 867 | },
|
860 | 868 | "additionalProperties": false
|
861 | 869 | },
|
|
871 | 879 | "target": {"type": "string"},
|
872 | 880 | "uid": {"type": "string"},
|
873 | 881 | "gid": {"type": "string"},
|
874 |
| - "mode": {"type": "number"} |
| 882 | + "mode": {"type": ["number", "string"]} |
875 | 883 | },
|
876 | 884 | "additionalProperties": false,
|
877 | 885 | "patternProperties": {"^x-": {}}
|
|
884 | 892 | "patternProperties": {
|
885 | 893 | "^[a-z]+$": {
|
886 | 894 | "oneOf": [
|
887 |
| - {"type": "integer"}, |
| 895 | + {"type": ["integer", "string"]}, |
888 | 896 | {
|
889 | 897 | "type": "object",
|
890 | 898 | "properties": {
|
891 |
| - "hard": {"type": "integer"}, |
892 |
| - "soft": {"type": "integer"} |
| 899 | + "hard": {"type": ["integer", "string"]}, |
| 900 | + "soft": {"type": ["integer", "string"]} |
893 | 901 | },
|
894 | 902 | "required": ["soft", "hard"],
|
895 | 903 | "additionalProperties": false,
|
|
0 commit comments