Skip to content

Commit df1767f

Browse files
committed
fix: set healthcheck for Mailpit container
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
1 parent 8652151 commit df1767f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/start/start.go

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

0 commit comments

Comments
 (0)