Docker and CI/CD · Junior · Question 25 of 75

Does depends_on: [db] wait until the database is ready to accept connections?

Explanation

By default it waits only for the container to start. Use condition: service_healthy with a healthcheck on db, and make the app retry connections anyway.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 25

Test yourself

Take the Docker and CI/CD · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz