interview-accountapi icon indicating copy to clipboard operation
interview-accountapi copied to clipboard

Sort services so that they always start in correct order

Open JasonMurrayCole opened this issue 3 years ago • 2 comments

In older versions of docker-compose running on Linux (1.23), small numbers of containers get scheduled to start up in the order in which they are listed in docker-compose.yml. In this case, it was trying to start up the api first. This container hangs because it cannot open connections to postgres and vault. If we put the api at the bottom of the file it will always start after postgres and vault are up.

Other than adjusting the ordering, no other changes were made.

JasonMurrayCole avatar Mar 20 '22 07:03 JasonMurrayCole

Why not using depends_on parameter?

ubombi avatar Sep 27 '22 05:09 ubombi

I didn't know that that existed.

JasonMurrayCole avatar Sep 27 '22 11:09 JasonMurrayCole