2022/08/11
That you can call docker compose kill to kill all docker-compose containers
That there’s a timeout shell command in gnu coreutils: https://man7.org/linux/man-pages/man1/timeout.1.html
That you can call docker compose kill to kill all docker-compose containers
That there’s a timeout shell command in gnu coreutils: https://man7.org/linux/man-pages/man1/timeout.1.html
that depends_on: [ service ] waits for service to be started, not for service to be healthy.
On startup, Compose does not wait until a container is “ready”, only until it’s running.
The solution for detecting the ready state of a service is to use the condition attribute with one of the following options:
- service_started
- service_healthy. This specifies that a dependency is expected to be “healthy”, which is defined with healthcheck, before starting a dependent service.
- service_completed_successfully. This specifies that a dependency is expected to run to successful completion before starting a dependent service.
Why docker compose is called “compose”: you can pass many compose.yaml files that get merged automatically.
docker compose -f first.yaml -f second.yaml
See https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/