make run may fail in some cases where mysql startup time takes a little longer time than usual.
depends_on directive guarantees only that mysql container will be started first and web will start second and sometimes when web is trying to connect to mysql, mysql is still not ready for connections.
So health-check will first wait for mysql up and ready for connections and only then web container will launched.
make run may fail in some cases where mysql startup time takes a little longer time than usual. depends_on directive guarantees only that mysql container will be started first and web will start second and sometimes when web is trying to connect to mysql, mysql is still not ready for connections. So health-check will first wait for mysql up and ready for connections and only then web container will launched.
btw, thanks for the great example!