Skip to content

Commit

Permalink
fix: add mailpit image
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Feb 9, 2025
1 parent 097311c commit 785f1cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ EOF
} else if utils.Config.Inbucket.Enabled {
env = append(env,
"GOTRUE_SMTP_HOST="+utils.InbucketId,
"GOTRUE_SMTP_PORT=2500",
"GOTRUE_SMTP_PORT=1025",
fmt.Sprintf("GOTRUE_SMTP_ADMIN_EMAIL=%s", utils.Config.Inbucket.AdminEmail),
fmt.Sprintf("GOTRUE_SMTP_SENDER_NAME=%s", utils.Config.Inbucket.SenderName),
)
Expand Down Expand Up @@ -696,14 +696,14 @@ EOF
started = append(started, utils.GotrueId)
}

// Start Inbucket.
// Start Mailpit
if utils.Config.Inbucket.Enabled && !isContainerExcluded(utils.Config.Inbucket.Image, excluded) {
inbucketPortBindings := nat.PortMap{"9000/tcp": []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Inbucket.Port), 10)}}}
inbucketPortBindings := nat.PortMap{"8025/tcp": []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Inbucket.Port), 10)}}}
if utils.Config.Inbucket.SmtpPort != 0 {
inbucketPortBindings["2500/tcp"] = []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Inbucket.SmtpPort), 10)}}
inbucketPortBindings["1025/tcp"] = []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Inbucket.SmtpPort), 10)}}
}
if utils.Config.Inbucket.Pop3Port != 0 {
inbucketPortBindings["1100/tcp"] = []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Inbucket.Pop3Port), 10)}}
inbucketPortBindings["1110/tcp"] = []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Inbucket.Pop3Port), 10)}}
}
if _, err := utils.DockerStart(
ctx,
Expand All @@ -712,10 +712,7 @@ EOF
},
container.HostConfig{
Binds: []string{
// Override default mount points to avoid creating multiple anonymous volumes
// Ref: https://github.com/inbucket/inbucket/blob/v3.0.4/Dockerfile#L52
utils.InbucketId + ":/config",
utils.InbucketId + ":/storage",
utils.InbucketId + ":/data",
},
PortBindings: inbucketPortBindings,
RestartPolicy: container.RestartPolicy{Name: "always"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const (
// Append to ServiceImages when adding new dependencies below
// TODO: try https://github.com/axllent/mailpit
kongImage = "library/kong:2.8.1"
inbucketImage = "inbucket/inbucket:3.0.3"
inbucketImage = "axllent/mailpit:v1.22.2"
postgrestImage = "postgrest/postgrest:v12.2.0"
pgmetaImage = "supabase/postgres-meta:v0.84.2"
studioImage = "supabase/studio:20250130-b048539"
Expand Down

0 comments on commit 785f1cb

Please sign in to comment.