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

Add indefinite wait with readiness check to ensure postgres running #44

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

m-dwyer
Copy link
Contributor

@m-dwyer m-dwyer commented Sep 4, 2024

Context

Sometimes, a project consuming the project may have a postgresql service with a dependency on another service, such as a setup. This causes the init_outbox to immediately fail if postgres isn't ready.

Similar to the kafka_local, we create a postgres_wait service that will tail indefinitely, and has a 3 second readiness probe to confirm postgres is ready. Once ready, init_outbox can run successfully.

Changes

Add postgres_wait service to check postgres is ready, and have init_outbox depend on this, so we don't attempt to setup postgres before ready.

@m-dwyer m-dwyer marked this pull request as ready for review September 4, 2024 07:07
@jasononeil jasononeil merged commit 805d35b into main Sep 4, 2024
8 checks passed
@jasononeil jasononeil deleted the wait-on-postgres-dep branch September 4, 2024 07:55
@jasononeil
Copy link
Member

Thanks!

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