-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional (opt-in) support for Mailpit #779
Changes from all commits
454ba3e
364c871
5f55845
1115f1d
c3803b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
services: | ||
mailpit: | ||
container_name: mailhog | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For backwards compatibility so you can still reference "mailhog" but it's really just mailpit. This can easily be removed and whatever breaks will need to be upgraded. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The simple solution would be: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I did like that and it worked. But I got confused that container is named mailhog, while we don't have such service and domain. So I would prefer removing this line |
||
image: axllent/mailpit:${WARDEN_MAILPIT_VERSION:-latest} | ||
environment: | ||
- MP_DATABASE=/data/mailpit.db | ||
volumes: | ||
- mailpitdata:/data | ||
labels: | ||
traefik.enable: true | ||
traefik.http.routers.mailpit.tls: true | ||
traefik.http.routers.mailpit.priority: 2 | ||
traefik.http.routers.mailpit.rule: Host(`webmail.${WARDEN_SERVICE_DOMAIN:-warden.test}`) | ||
traefik.http.routers.mailpit.service: mailpit | ||
traefik.http.services.mailpit.loadbalancer.server.port: 8025 | ||
# Legacy Mailhog redirect | ||
traefik.http.routers.legacy-mailhog.tls: true | ||
traefik.http.routers.legacy-mailhog.priority: 1 | ||
traefik.http.routers.legacy-mailhog.rule: Host(`mailhog.${WARDEN_SERVICE_DOMAIN:-warden.test}`) | ||
traefik.http.routers.legacy-mailhog.middlewares: legacy-mailhog-redirect | ||
traefik.http.middlewares.legacy-mailhog-redirect.redirectregex.regex: "^https?://mailhog\\.([^/]+)/.*" | ||
traefik.http.middlewares.legacy-mailhog-redirect.redirectregex.replacement: https://webmail.$${1}/ | ||
traefik.http.middlewares.legacy-mailhog-redirect.redirectregex.permanent: true | ||
|
||
restart: ${WARDEN_RESTART_POLICY:-always} | ||
volumes: | ||
mailpitdata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tags in this file don't use the "array of strings" format because the redirect wasn't working unless I used the object style notation.