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 a readiness_probe for postgresql #2094

Merged
merged 1 commit into from
May 29, 2024

Conversation

mootoday
Copy link
Contributor

@mootoday mootoday commented May 28, 2024

Summary

This PR adds the following readiness_probe to the postgresql plugin:

    readiness_probe:
      exec:
        command: "pg_isready"

With that change, Devbox users have the ability to create their own processes that depend on a healthy postgresql service. For example, to seed a database, one can add the following to a process-compose.yml:

version: "0.5"
processes:
  seed_db:
    command: |
      npm run db:seed # for example
    depends_on:
      postgresql:
        condition: process_healthy

How was it tested?

In a project with the above process-compose.yml file and the changes in this PR applied to .devbox/virtenv/postgresql/process-compose.yml

Signed-off-by: @mootoday <154029656+mootoday@users.noreply.github.com>
@Lagoja
Copy link
Contributor

Lagoja commented May 28, 2024

This is an awesome add, was working with a new Devbox user who was asking about this just last week.

@Lagoja Lagoja requested a review from mikeland73 May 29, 2024 23:01
Copy link
Contributor

@mikeland73 mikeland73 left a comment

Choose a reason for hiding this comment

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

🎉

@mikeland73 mikeland73 merged commit ff6826d into jetify-com:main May 29, 2024
24 checks passed
@mootoday mootoday deleted the postgresql-add-readiness-probe branch May 29, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants