This commit is contained in:
Sebastiaan van Stijn 2024-10-19 13:04:49 +08:00 committed by GitHub
commit e8626137c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 39 additions and 1 deletions

View File

@ -1,6 +1,12 @@
version: "3.13" version: "3.13"
services: services:
bar:
image: busybox:latest
depends_on:
foo:
condition: service_started
required: true
foo: foo:
build: build:

View File

@ -1,5 +1,11 @@
version: "3.13" version: "3.13"
services: services:
bar:
image: busybox:latest
depends_on:
foo:
condition: service_started
required: true
foo: foo:
build: build:
context: ./dir context: ./dir

View File

@ -133,7 +133,33 @@
}, },
"additionalProperties": false "additionalProperties": false
}, },
"depends_on": {"$ref": "#/definitions/list_of_strings"}, "depends_on": {
"oneOf": [
{"$ref": "#/definitions/list_of_strings"},
{
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"type": "object",
"additionalProperties": false,
"properties": {
"restart": {"type": "boolean"},
"required": {
"type": "boolean",
"default": true
},
"condition": {
"type": "string",
"enum": ["service_started", "service_healthy", "service_completed_successfully"]
}
},
"required": ["condition"]
}
}
}
]
},
"devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"dns": {"$ref": "#/definitions/string_or_list"}, "dns": {"$ref": "#/definitions/string_or_list"},
"dns_search": {"$ref": "#/definitions/string_or_list"}, "dns_search": {"$ref": "#/definitions/string_or_list"},