fix: set healthcheck for Mailpit container #4010
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.3Dockerfile
: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.