-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
services:
redis:
restart: always
image: redis:7-alpine
volumes:
- redis-data:/data
healthcheck:
test: "redis-cli ping"
interval: 5s
retries: 20
ports:
- "6379:6379"This errors with Error: typeMismatch(Yams.Node.Sequence, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "services", intValue: nil), _DictionaryCodingKey(stringValue: "redis", intValue: nil), CodingKeys(stringValue: "healthcheck", intValue: nil), CodingKeys(stringValue: "test", intValue: nil)], debugDescription: "Expected to decode Sequence but found Node instead.", underlyingError: nil))
test defines the command Compose runs to check container health. It can be either a string or a list. If it's a list, the first item must be either NONE, CMD or CMD-SHELL. If it's a string, it's equivalent to specifying CMD-SHELL followed by that string.
https://github.com/compose-spec/compose-spec/blob/main/05-services.md#healthcheck
container-compose v0.9.0 installed with brew
$ container-compose --version
container-compose version 0.9.0