Skip to content

Commit

Permalink
Switch from mailhog to maildev
Browse files Browse the repository at this point in the history
- change service-name "mailhog" to "mail"
- Use "valid" email addresses in keycloak realm configuration
  • Loading branch information
thomasdarimont committed Feb 1, 2024
1 parent 784c9b4 commit 8439d65
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 41 deletions.
4 changes: 2 additions & 2 deletions config/stage/dev/realms/acme-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ attributes:

smtpServer:
port: 1025
host: mailhog
host: mail
from: "acme-api-sso@local"
fromDisplayName: "Acme API Account"
replyTo: "no-reply@localhost"
replyTo: "no-reply@acme.test"
replyToDisplayName: "Acme API Support"

clientScopes:
Expand Down
4 changes: 2 additions & 2 deletions config/stage/dev/realms/acme-apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ attributes:
smtpServer:
replyToDisplayName: "Acme APPS Support"
port: 1025
host: mailhog
replyTo: "no-reply@localhost"
host: mail
replyTo: "no-reply@acme.test"
from: "acme-apps-sso@local"
fromDisplayName: "Acme APPS Account"

Expand Down
6 changes: 3 additions & 3 deletions config/stage/dev/realms/acme-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ adminEventsDetailsEnabled: false
smtpServer:
replyToDisplayName: "Acme Employee Support"
port: 1025
host: mailhog
replyTo: "no-reply@localhost"
from: "acme-internal-sso@local"
host: mail
replyTo: "no-reply@acme.test"
from: "acme-internal-sso@acme.test"
fromDisplayName: "Acme Employee Account"

clientScopes:
Expand Down
6 changes: 3 additions & 3 deletions config/stage/dev/realms/acme-ldap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ browserFlow: "Browser Identity First"
smtpServer:
replyToDisplayName: "Acme Employee Support"
port: 1025
host: mailhog
replyTo: "no-reply@localhost"
from: "acme-internal-sso@local"
host: mail
replyTo: "no-reply@acme.test"
from: "acme-internal-sso@acme.test"
fromDisplayName: "Acme Employee Account"

clientScopes:
Expand Down
6 changes: 3 additions & 3 deletions config/stage/dev/realms/acme-passwordless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ adminEventsDetailsEnabled: false
smtpServer:
replyToDisplayName: "Acme Employee Support"
port: 1025
host: mailhog
replyTo: "no-reply@localhost"
from: "acme-internal-sso@local"
host: mail
replyTo: "no-reply@acme.test"
from: "acme-internal-sso@acme.test"
fromDisplayName: "Acme Employee Account"

requiredActions:
Expand Down
4 changes: 2 additions & 2 deletions config/stage/dev/realms/company-apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ attributes:
smtpServer:
replyToDisplayName: "Company APPS Support"
port: 1025
host: mailhog
replyTo: "no-reply@localhost"
host: mail
replyTo: "no-reply@acme.test"
from: "company-apps-sso@local"
fromDisplayName: "Company APPS Account"

Expand Down
4 changes: 2 additions & 2 deletions config/stage/dev/realms/company-users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ attributes:
smtpServer:
replyToDisplayName: "Company Users Support"
port: 1025
host: mailhog
replyTo: "no-reply@localhost"
host: mail
replyTo: "no-reply@acme.test"
from: "company-apps-sso@local"
fromDisplayName: "Company Users Account"

Expand Down
2 changes: 1 addition & 1 deletion deployments/local/dev/docker-compose-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_STRICT: "true"
GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel"
GF_SMTP_ENABLED: "true"
GF_SMTP_HOST: "mailhog"
GF_SMTP_HOST: "mail"
GF_SMTP_PORT: 1025
volumes:
# - ./run/grafana:/var/lib/grafana:z
Expand Down
2 changes: 1 addition & 1 deletion deployments/local/dev/docker-compose-graylog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
# Enable E-mail configuration for alerts
- GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
- GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=false
- GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=mailhog
- GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=mail
- GRAYLOG_TRANSPORT_EMAIL_PORT=1025
- GRAYLOG_TRANSPORT_EMAIL_USE_TLS=false
- GRAYLOG_TRANSPORT_EMAIL_USE_SSL=false
Expand Down
16 changes: 7 additions & 9 deletions deployments/local/dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
services:
mailhog:
# Web Interface: http://localhost:1080/#
# Web API: http://localhost:1080/api/v2/messages
image: mailhog/mailhog:v1.0.1@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea
logging:
driver: none
# Disable mailhog logging, see: https://github.com/mailhog/MailHog/issues/56
entrypoint: ["/bin/sh", "-c", "MailHog &>/dev/null"]
# Web Interface: http://localhost:1080/mail
# Web API: https://github.com/maildev/maildev/blob/master/docs/rest.md
mail:
image: maildev/maildev:2.1.0@sha256:57e0b96fefb5dfeda8b39fb04c666ee7eef7be899ac8ea0e4d983bb0ea64aaff
environment:
MAILDEV_BASE_PATHNAME: "/mail"
ports:
- "1080:8025"
- "1080:1080"
- "1025:1025"

acme-account-console:
Expand Down
18 changes: 9 additions & 9 deletions deployments/local/standalone/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ services:
- keycloak

mailserver:
# Web Interface: http://localhost:1080/#
# Web API: http://localhost:1080/api/v2/messages
image: mailhog/mailhog:v1.0.1@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea
logging:
driver: none
# Disable mailhog logging, see: https://github.com/mailhog/MailHog/issues/56
entrypoint: [ "/bin/sh", "-c", "MailHog &>/dev/null" ]
# Web Interface: http://localhost:1080/mail
# Web API: https://github.com/maildev/maildev/blob/master/docs/rest.md
image: maildev/maildev:2.1.0@sha256:57e0b96fefb5dfeda8b39fb04c666ee7eef7be899ac8ea0e4d983bb0ea64aaff
environment:
MAILDEV_BASE_PATHNAME: "/mail"
ports:
- "1080:8025"
- "1025:1025"
- "1080:1080" #web ui
- "1025:1025" #smtp
networks:
- backend

volumes:
keycloak-db-data:
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ d) **Operator** configuring realm and server for different stages
- Realm configuration as Configuration as Code via [keycloak-config-cli](https://github.com/adorsys/keycloak-config-cli)
- Multi-realm setup example with OpenID Connect and SAML based Identity Brokering
- LDAP based User Federation backed by [Docker-OpenLDAP](https://github.com/osixia/docker-openldap)
- Mail Server integration backed by [MailHog](https://github.com/mailhog/MailHog)
- Mail Server integration backed by [maildev](https://github.com/maildev/maildev)
- TLS Support
- Support for exposing metrics via smallrye-metrics
- Examples for running a cluster behind a reverse proxy with examples for [HAProxy](deployments/local/cluster/haproxy), [Apache](deployments/local/cluster/apache), [nginx](deployments/local/cluster/nginx), [caddy](deployments/local/cluster/caddy)
Expand Down Expand Up @@ -373,10 +373,10 @@ java bin/realmImex.java --realm=acme-internal --verbose --action=import

# Tools

## Mailhog
## maildev

Web Interface: http://localhost:1080/#
Web API: http://localhost:1080/api/v2/messages
Web Interface: http://localhost:1080/mail
Web API: https://github.com/maildev/maildev/blob/master/docs/rest.md

## phpldapadmin

Expand Down

0 comments on commit 8439d65

Please sign in to comment.