Hands-on task
docker-compose: healthcheck and dependency
In /root/docker-compose.yml, define two services: db (postgres) with a healthcheck, and app (nginx) that starts only once db is healthy (depends_on with condition: service_healthy). The file must conform to the Compose Specification schema — run yamlschema compose /root/docker-compose.yml to see the errors.
- docker compose
- healthcheck
- depends_on
- service_healthy
- yaml