Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

Sort services so that they always start in correct order #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JasonMurrayCole
Copy link

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.

In older versions of docker-compose (Say 1.23), small numbers of containers get scheduled to start up in the order in which they are listed. In this case, it was trying to start up the api first, which hangs since 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.
@ubombi
Copy link

ubombi commented Sep 27, 2022

Why not using depends_on parameter?

@JasonMurrayCole
Copy link
Author

I didn't know that that existed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants