interview-accountapi
interview-accountapi copied to clipboard
Sort services so that they always start in correct order
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.
Why not using depends_on parameter?
I didn't know that that existed.