Skip to content

Commit

Permalink
Switch from mailhog to mailpit. (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksantamaria authored Jul 15, 2024
1 parent 33cbe89 commit 19b6e0f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 39 deletions.
9 changes: 8 additions & 1 deletion gh-actions-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ target "elasticsearch" {
}
target "mailhog" {
inherits = ["docker-metadata-action"]
context = "${CONTEXT}/mailhog"
context = "${CONTEXT}/mailpit"
dockerfile = "Dockerfile"

platforms = ["linux/amd64", "linux/arm64"]
}
target "mailpit" {
inherits = ["docker-metadata-action"]
context = "${CONTEXT}/mailpit"
dockerfile = "Dockerfile"

platforms = ["linux/amd64", "linux/arm64"]
Expand Down
34 changes: 0 additions & 34 deletions images/mailhog/Dockerfile

This file was deleted.

33 changes: 33 additions & 0 deletions images/mailpit/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# mailpit Dockerfile
#

FROM alpine:latest
ARG MAILPIT_VERSION=1.19.0

# Install ca-certificates, required for the "release message" feature:
RUN apk --no-cache add \
ca-certificates \
curl

# Install mailpit.
VOLUME /tmp
WORKDIR /tmp
RUN curl -L "https://github.com/axllent/mailpit/releases/download/v${MAILPIT_VERSION}/mailpit-$(echo ${TARGETPLATFORM:-linux-amd64} | tr '/' '-').tar.gz" --output mailpit.tar.gz && \
tar -vxxzf mailpit.tar.gz && \
mv mailpit /bin/mailpit && \
chmod +x /bin/mailpit

# Add mailpit user/group with uid/gid 1000.
# This is a workaround for boot2docker issue #581, see
# https://github.com/boot2docker/boot2docker/issues/581
RUN adduser -D -u 1000 mailpit

USER mailpit

WORKDIR /home/mailpit

ENTRYPOINT ["mailpit"]

# Expose the SMTP and HTTP ports:
EXPOSE 1025 8025
8 changes: 4 additions & 4 deletions images/mailhog/README.md → images/mailpit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Container Image - bay-mailhog
# Container Image - bay-mailpit

Provides a mailhog image for local development.
Provides a [mailpit](https://github.com/axllent/mailpit) image for local development.

## Usage

Expand All @@ -12,8 +12,8 @@ You can also use it in your Docker Compose stack with the following snippet:

```
services:
mailhog:
image: ghcr.io/dpc-sdp/bay/mailhog:6.x
mailpit:
image: ghcr.io/dpc-sdp/bay/mailpit:6.x
ports:
- 1025
- 8025
Expand Down

0 comments on commit 19b6e0f

Please sign in to comment.