28 ms·
You can define any order or restart behavior you need with v2. As long any container with a service dependency fail hards if that dependency is missing/down, it
by nikisweeting 6y ago
You can define any order or restart behavior you need with v2. As long any container with a service dependency fail hards if that dependency is missing/down, it will be restarted and the whole app will eventually reach an up state.
restart: on-failure
depends_on:
other_service:
condition: service_healthy
https://docs.docker.com/compose/compose-file/compose-file-v2/#restart https://docs.docker.com/compose/compose-file/compose-file-v2...
https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on https://docs.docker.com/compose/compose-file/compose-file-v2...
- klibertp 6y agoFrom GP: > Problem being, "depends_on" was removed in version 3, with no replacement in sight. How is v2 relevant?
- nikisweeting 6y agov2 and v3 specs are merged as of September apparently, so either set of options works in the current version. (See cousin comments above)