Skip to content

fix: set healthcheck for Mailpit container #4010

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

Conversation

aloisklink
Copy link
Contributor

What kind of change does this PR introduce?

Bug fix for users using podman (and I suspect older versions of Docker too).

What is the current behavior?

The mailpit container's built-in healthcheck does not work with podman, which causes supabase start to fail without the --ignore-health-check flag.

I'm not 100% sure why this is, but I suspect it's because the mailpit healthcheck has --start-interval=1s, and the --start-interval option was only added to Docker Engine since v25.0 (or v1.44 of the Docker API), which podman does not yet suppprt (see containers/podman#26505).

Looking at the logs in #3566, this should fix the supabase_inbucket_chat-monitor container is not ready: issue reported there.

What is the new behavior?

Setting an explicit healthcheck matches the healthchecks we set for the other containers, and fixes this issue.

supabase start no longer requires the --ignore-health-check flag when starting the mailpit container.

Fixes half of: #3566 (only the supabase_inbucket_chat-monitor container is not ready: error).

Additional context

This is the HEALTHCHECK command in the mailpit v1.22.3 Dockerfile:

https://github.com/axllent/mailpit/blob/c7d7810e687b943272c1c6b9aad07f9c59809a04/Dockerfile#L28

They specified the internal as 15 seconds, but I decided to keep it as 10, since every other healthcheck config in this supabase CLI uses 10 seconds.

@aloisklink aloisklink requested a review from a team as a code owner August 10, 2025 08:11
The mailpit container's built-in healthcheck does not work with podman,
which causes `supabase start` to fail without the
`--ignore-health-check` flag.

I'm not 100% sure why this is, but I suspect it's because the mailpit
[healthcheck has `--start-interval=1s`][1], and the `--start-interval`
option was [only added to Docker Engine since v25.0][2]
(or v1.44 of the Docker API), which podman does not yet suppprt
(see containers/podman#26505).

Setting an explicit healthcheck matches the healthchecks we set for the
other containers, and fixes this issue.

[1]: https://github.com/axllent/mailpit/blob/d26e317d2507015d4d9fa247207ccd6a68fe645f/Dockerfile#L28
[2]: https://docs.docker.com/reference/dockerfile/#healthcheck
Fixes half of: supabase#3566
@aloisklink aloisklink force-pushed the fix/add-healthcheck-to-mailpit-container branch from df1767f to d393252 Compare August 10, 2025 08:17
@aloisklink
Copy link
Contributor Author

The failing CI / Codegen check seems to be fixed by #4008

@coveralls
Copy link

Pull Request Test Coverage Report for Build 16900208435

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.006%) to 54.823%

Files with Coverage Reduction New Missed Lines %
internal/storage/rm/rm.go 2 80.61%
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 16900117802: 0.006%
Covered Lines: 6201
Relevant Lines: 11311

💛 - Coveralls

@sweatybridge sweatybridge merged commit 9d31bb1 into supabase:develop Aug 12, 2025
10 checks passed
@sweatybridge
Copy link
Contributor

Thank you for the thorough investigation and PR!

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