This commit is contained in:
Sebastiaan van Stijn 2024-11-22 17:57:48 +07:00 committed by GitHub
commit 5157c82d88
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"
services:
bar:
image: busybox:latest
depends_on:
foo:
condition: service_started
required: true
foo:
build:

View File

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

View File

@ -133,7 +133,33 @@
},
"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},
"dns": {"$ref": "#/definitions/string_or_list"},
"dns_search": {"$ref": "#/definitions/string_or_list"},