Question from the Docker compose test

How to check that the `db` and `redis` services are running before starting the `web` service in a `docker-compose.yml` file.

Easy

Consider the following content in a docker-compose.yml :

services:
  web:
    image: nginx
    depends_on:
      - db
      - redis
  db:
    image: postgres
  redis:
    image: redis

In this file, what does the depends_on field do under the web service?

Author: AxelStatus: PublishedQuestion passed 64 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!