Compose Startup Order

medium 5 XP ~1 minQuiz Pro

In Docker Compose, the api service has depends_on: [db]. On startup the API still crashes with "connection refused" to the database. Why?

This is a Pro problem

Pro unlocks every lab and quiz, all roadmaps and a full daily plan.

Unlock with Pro

Pro question

Upgrade to answer this question and see its explanation.

See Pro