Skip to content

Commit 9d31bb1

Browse files
fix: set healthcheck for Mailpit container (#4010)
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: #3566 Co-authored-by: Han Qiao <[email protected]>
1 parent 98ca997 commit 9d31bb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/start/start.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,14 @@ EOF
730730
ctx,
731731
container.Config{
732732
Image: utils.Config.Inbucket.Image,
733+
Healthcheck: &container.HealthConfig{
734+
Test: []string{"CMD", "/mailpit", "readyz"},
735+
Interval: 10 * time.Second,
736+
Timeout: 2 * time.Second,
737+
Retries: 3,
738+
// StartPeriod taken from upstream Dockerfile
739+
StartPeriod: 10 * time.Second,
740+
},
733741
},
734742
container.HostConfig{
735743
PortBindings: inbucketPortBindings,

0 commit comments

Comments
 (0)