[go: up one dir, main page]

Today I Learned

tags


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


2024/03/21

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.

https://docs.docker.com/compose/startup-order/


2025/03/10

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/