最佳答案
docker-compose 2.1 offers the nice feature to specify a condition
with depends_on
. The current docker-compose documentation states:
Version 3 no longer supports the condition form of depends_on.
Unfortunately the documentation does not explain, why the condition
form was removed and is lacking any specific recommondation on how to implement that behaviour using V3 upwards.