From 9fed08245a87d631d1ee4f9d75a60dc1d8940a3e Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 4 Aug 2022 22:44:54 +1200 Subject: [PATCH 1/4] Bugfix: Command flag should be `--auth-file` --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 8b662bd..131030d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -85,6 +85,6 @@ func init() { rootCmd.Flags().StringVarP(&config.SMTPListen, "smtp", "s", config.SMTPListen, "SMTP bind interface and port") rootCmd.Flags().StringVarP(&config.HTTPListen, "listen", "l", config.HTTPListen, "HTTP bind interface and port for UI") rootCmd.Flags().IntVarP(&config.MaxMessages, "max", "m", config.MaxMessages, "Max number of messages per mailbox") - rootCmd.Flags().StringVarP(&config.AuthFile, "-auth-file", "a", config.AuthFile, "A username:bcryptpw mapping file") + rootCmd.Flags().StringVarP(&config.AuthFile, "auth-file", "a", config.AuthFile, "A username:bcryptpw mapping file") rootCmd.Flags().BoolVarP(&config.VerboseLogging, "verbose", "v", false, "Verbose logging") } From 123b0f19dbcd0542a73df6f487372ace03bfc5ff Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 4 Aug 2022 22:51:20 +1200 Subject: [PATCH 2/4] Feature:: Add multi-arch docker image Resolves #2 --- .dockerignore | 2 ++ .github/workflows/build-docker.yml | 37 ++++++++++++++++++++++++++++++ Dockerfile | 20 ++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/build-docker.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bc377d6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +/node_modules +/mailpit diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 0000000..8c1858c --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,37 @@ +on: + release: + types: [created] + +name: Build docker images +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64,linux/arm + build-args: | + "VERSION=${{ steps.tag.outputs.tag }}" + push: true + tags: axllent/mailpit:latest,axllent/mailpit:${{ steps.tag.outputs.tag }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e6b0126 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM golang:alpine as builder + +ARG VERSION=dev + +COPY . /app + +WORKDIR /app + +RUN apk add --no-cache git npm && \ +npm install && npm run package && \ +CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/axllent/mailpit/cmd.Version=${VERSION}" -o /mailpit + + +FROM alpine:latest + +COPY --from=builder /mailpit /mailpit + +RUN apk add --no-cache tzdata + +ENTRYPOINT ["/mailpit"] From 47376d4db98f6b303e05240bbd154085442cb913 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 4 Aug 2022 22:59:07 +1200 Subject: [PATCH 3/4] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bfde49a..c3d641e 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ Mailpit is inspired by [MailHog](#why-rewrite-mailhog), but much, much faster. - Configurable automatic email pruning (default keeps the most recent 500 emails) - Fast SMTP processing & storing - approximately 300-600 emails per second depending on CPU, network speed & email size - Can handle tens of thousands of emails +- Multi-arch [Docker images](https://github.com/axllent/mailpit/wiki/Docker-image) ## Planned features - Optional HTTPS for web UI - Browser notifications for new mail (HTTPS only) -- Docker container ## Installation From 74fe6d55b4ed096bb3b3a3a497389312e6f3adcc Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Thu, 4 Aug 2022 22:59:57 +1200 Subject: [PATCH 4/4] Release 0.0.7 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75b6a31..ce78df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Notable changes to Mailpit will be documented in this file. +## 0.0.7 + +### Bugfix +- Command flag should be `--auth-file` + + ## 0.0.6 ### Bugfix