Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent init container failing when DB is empty #51

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

jimnarey
Copy link
Contributor

It's common for the init container to fail when cloning the repo for the frst time or after deleting the postgres docker volume. This is because it takes postgres a few seconds to initialise the database and it isn't ready when the init container runs.

This ensure that the init container waits for the postgres container to be ready, rather than simply running, before starting. Also added to the web container.

It's common for the init container to fail when cloning the repo
for the frst time or after deleting the postgres docker volume.
This is because it takes postgres a few seconds to initialise
the database and it isn't ready when the init container runs.

This ensure that the init container waits for the postgres container
to be ready, rather than simply running, before starting. Also added
to the web container.
Copy link
Contributor

@maxf maxf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most welcome!

@jimnarey jimnarey merged commit 26b86cc into main Mar 11, 2024
1 check passed
@jimnarey jimnarey deleted the fix-compose-init-error branch April 18, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants