Skip to content

Commit 473e73d

Browse files
authored
feat: capture demo mail in Mailpit so the Docker stacks show email verification (#87)
* feat: capture demo mail in Mailpit so the Docker stacks show email verification Both stacks ran docker-mailserver with SMTP_ONLY=1, a relay with no route to real inboxes, so #85 had to set USER_REGISTRATION_SENDVERIFICATIONEMAIL=false and the demo could never show registration verification or password reset. Replace it with axllent/mailpit, which captures outbound mail and serves it as a web inbox on 8025. The app now talks plain SMTP to mailpit:1025 with auth and STARTTLS off, and neither stack overrides sendVerificationEmail, so the base default of true applies and the two-hop registration flow works end to end. The healthcheck is `mailpit readyz` rather than an HTTP probe: the image is built from scratch and has no curl, wget, or nc. Drops mailserver.env, the ./config/ bind mount, the maildata/mailstate/maillogs volumes, the NET_ADMIN/SYS_PTRACE capabilities, and the published ports 25/587. SELINUX_LABEL went with the bind mount, so compose no longer warns about it. Closes #86 * fix: correct the pending-verification page title message key messages.properties spelled the key page.title.registration-ending-verification while registration-pending-verification.html asks for page.title.registration-pending-verification, so the page rendered ??page.title.registration-pending-verification_en?? as its title. The page is only reachable when verification email is on, which is why the typo survived: no documented run path reached it until the Docker stacks switched to Mailpit. * docs: document the Mailpit web inbox as the demo's mail path Rewrites the Docker quick start, the CONFIGURATION mail section, the AUTHENTICATION registration and Keycloak walkthroughs, the DEVELOPMENT stack descriptions, and keycloak/README.md around reading mail at localhost:8025. Drops the SELINUX_LABEL environment row, which no longer exists, and corrects a stale compose.yaml:86-90 healthcheck citation to 72-76. Notes a framework-side limitation found while verifying this: the resend-verification page fails against ds-spring-user-framework 5.3.0, whose UserAPI.resendRegistrationToken binds the full registration UserDto with @notblank on firstName, lastName, password, and matchingPassword, so the email-only payload resend-verification.js posts is rejected with HTTP 400. * fix(review): correct Mailpit healthcheck comment and CHANGELOG claim - compose.yaml, docker-compose-keycloak.yml: the "built from scratch: no curl, no wget, no nc" comment was wrong. Verified against axllent/mailpit:v1.30: it's Alpine-based with busybox providing wget and nc; only curl is absent. `mailpit readyz` is still the right choice — it's the image's own baked-in default HEALTHCHECK. - CHANGELOG.md: dropped resend-verification from the list of flows the demo "exercises for real" — it's documented elsewhere in this same change (docs/CONFIGURATION.md, docs/AUTHENTICATION.md) as broken against ds-spring-user-framework 5.3.0, so the two entries contradicted each other. * fix: pin Mailpit to the exact patch version that was verified The stacks pinned axllent/mailpit:v1.30, a floating minor tag, while the flows were verified against v1.30.7. A patch bump could change the web UI or the readyz probe and silently break the documented demo path. Matches how keycloak:25.0.6 is pinned; raised in review on #87.
1 parent 55337f5 commit 473e73d

10 files changed

Lines changed: 113 additions & 129 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,30 @@ the library.
99

1010
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1111

12+
## 2026-08-17
13+
14+
### Changed
15+
- Both Docker stacks (`compose.yaml`, `docker-compose-keycloak.yml`) now run
16+
[Mailpit](https://mailpit.axllent.org/) instead of `docker-mailserver`. Mailpit captures outbound
17+
mail and serves it as a web inbox on http://localhost:8025, so the demo exercises the real
18+
registration-verification and password-reset flows: register, read the message in the browser,
19+
click the link, log in. (Resend-verification is still broken for an unrelated reason; see the
20+
known-limitation note in `docs/CONFIGURATION.md`.)
21+
- Neither stack sets `USER_REGISTRATION_SENDVERIFICATIONEMAIL` any more; both use the base
22+
`user.registration.sendVerificationEmail: true`
23+
- App containers point at `SPRING_MAIL_HOST: mailpit` / `SPRING_MAIL_PORT: 1025`, auth and STARTTLS off
24+
25+
### Fixed
26+
- `page.title.registration-pending-verification` in `messages.properties` was spelled
27+
`registration-ending-verification`, so the pending-verification page rendered
28+
`??page.title.registration-pending-verification_en??` as its title. The page is on the Docker demo's
29+
happy path now that verification is on, which is how the typo surfaced
30+
31+
### Removed
32+
- `mailserver.env`, the `./config/` mail bind mount, the `maildata`/`mailstate`/`maillogs` volumes, the
33+
`NET_ADMIN`/`SYS_PTRACE` capabilities, and the published SMTP ports 25/587. The `SELINUX_LABEL`
34+
variable went with the bind mount, so `docker compose` no longer warns that it is unset
35+
1236
## 2026-08-15
1337

1438
### Added

‎README.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ docker compose up --build
8686
```
8787

8888
The app image is built from source inside Docker, so the first build takes several minutes. When it is up,
89-
open http://localhost:8080 and register at http://localhost:8080/user/register.html. This stack sets
90-
`USER_REGISTRATION_SENDVERIFICATIONEMAIL=false`, so accounts are enabled at registration and you can log in
91-
immediately. Its `mailserver` container is a relay with no route to real inboxes, so nothing it accepts will
92-
reach an actual mailbox. The stack runs under the `dev` profile and loads no sample events.
89+
open http://localhost:8080 and register at http://localhost:8080/user/register.html. The stack captures every
90+
mail the app sends in [Mailpit](https://mailpit.axllent.org/) instead of delivering it, so the real flows work
91+
end to end: open http://localhost:8025, click the verification link, then log in. Password reset from
92+
http://localhost:8080/user/forgot-password.html arrives in the same inbox. The stack runs under the `dev`
93+
profile and loads no sample events.
9394

9495
Stop it with Ctrl-C, then `docker compose down -v` to remove the containers and their data.
9596

‎compose.yaml‎

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,25 @@ services:
2121
timeout: 5s
2222
retries: 3
2323

24-
mailserver:
25-
image: docker.io/mailserver/docker-mailserver:latest
24+
mailpit:
25+
image: axllent/mailpit:v1.30.7
2626
container_name: springuser-mail
27-
hostname: mailserver
28-
domainname: local
29-
env_file: mailserver.env
3027
ports:
31-
- "25:25"
32-
- "587:587"
33-
volumes:
34-
- maildata:/var/mail
35-
- mailstate:/var/mail-state
36-
- maillogs:/var/log/mail
37-
- ./config/:/tmp/docker-mailserver/${SELINUX_LABEL}
28+
# Web inbox. Open http://localhost:8025 to read the verification and password-reset mail the
29+
# app sends. SMTP (1025) is not published: only the app container needs to reach it.
30+
- "8025:8025"
3831
environment:
39-
PERMIT_DOCKER: connected-networks
40-
ONE_DIR: 1
41-
DMS_DEBUG: 0
42-
SPOOF_PROTECTION: 0
43-
REPORT_RECIPIENT: 1
44-
ENABLE_SPAMASSASSIN: 0
45-
ENABLE_CLAMAV: 0
46-
ENABLE_FAIL2BAN: 1
47-
ENABLE_POSTGREY: 0
48-
SMTP_ONLY: 1
49-
cap_add:
50-
- NET_ADMIN
51-
- SYS_PTRACE
32+
MP_MAX_MESSAGES: 5000
33+
# The app connects without auth (see SPRING_MAIL_* below). These two keep Mailpit accepting the
34+
# message if you point a client at it that insists on AUTH over a plaintext connection.
35+
MP_SMTP_AUTH_ACCEPT_ANY: 1
36+
MP_SMTP_AUTH_ALLOW_INSECURE: 1
5237
healthcheck:
53-
test: ["CMD", "nc", "-z", "localhost", "25"]
54-
interval: 30s
55-
timeout: 10s
38+
# No curl in the image (Alpine + busybox, so wget/nc exist but curl doesn't). `mailpit readyz`
39+
# is what the image bakes into its own default HEALTHCHECK; this override just makes it explicit.
40+
test: ["CMD", "/mailpit", "readyz"]
41+
interval: 10s
42+
timeout: 5s
5643
retries: 5
5744

5845
myapp-main:
@@ -64,7 +51,7 @@ services:
6451
depends_on:
6552
myapp-db:
6653
condition: service_healthy
67-
mailserver:
54+
mailpit:
6855
condition: service_healthy
6956
ports:
7057
- "8080:8080"
@@ -73,24 +60,20 @@ services:
7360
SPRING_DATASOURCE_USERNAME: springuser
7461
SPRING_DATASOURCE_PASSWORD: springuser
7562
SPRING_PROFILES_ACTIVE: dev
76-
SPRING_MAIL_HOST: mailserver
77-
SPRING_MAIL_PORT: 25
63+
# Mailpit captures everything the app sends and shows it at http://localhost:8025. It speaks
64+
# plain SMTP on 1025 with no auth and no STARTTLS, so verification and password-reset mail is
65+
# readable without any credentials. Registration verification is left at its base default of
66+
# true (application.yml:113): register, open the web inbox, click the link, log in.
67+
SPRING_MAIL_HOST: mailpit
68+
SPRING_MAIL_PORT: 1025
7869
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH: "false"
7970
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: "false"
8071
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED: "false"
81-
# The mailserver container is a relay with no route to real inboxes, so a verification link
82-
# would never arrive. With this false the framework enables new accounts immediately and you
83-
# can log in straight after registering. To exercise verification instead, set this to true
84-
# and point the SPRING_MAIL_* values above at a real SMTP server.
85-
USER_REGISTRATION_SENDVERIFICATIONEMAIL: "false"
8672
healthcheck:
8773
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/actuator/health"]
8874
interval: 30s
8975
timeout: 10s
9076
retries: 5
9177

9278
volumes:
93-
maildata:
94-
mailstate:
95-
maillogs:
9679
userdb:

‎docker-compose-keycloak.yml‎

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,25 @@ services:
2020
timeout: 5s
2121
retries: 3
2222

23-
mailserver:
24-
image: docker.io/mailserver/docker-mailserver:latest
23+
mailpit:
24+
image: axllent/mailpit:v1.30.7
2525
container_name: springuser-mail
26-
hostname: mailserver
27-
domainname: local
28-
env_file: mailserver.env
2926
ports:
30-
- "25:25"
31-
- "587:587"
32-
volumes:
33-
- maildata:/var/mail
34-
- mailstate:/var/mail-state
35-
- maillogs:/var/log/mail
36-
- ./config/:/tmp/docker-mailserver/${SELINUX_LABEL}
27+
# Web inbox. Open http://localhost:8025 to read the verification and password-reset mail the
28+
# app sends. SMTP (1025) is not published: only the app container needs to reach it.
29+
- "8025:8025"
3730
environment:
38-
PERMIT_DOCKER: connected-networks
39-
ONE_DIR: 1
40-
DMS_DEBUG: 0
41-
SPOOF_PROTECTION: 0
42-
REPORT_RECIPIENT: 1
43-
ENABLE_SPAMASSASSIN: 0
44-
ENABLE_CLAMAV: 0
45-
ENABLE_FAIL2BAN: 1
46-
ENABLE_POSTGREY: 0
47-
SMTP_ONLY: 1
48-
cap_add:
49-
- NET_ADMIN
50-
- SYS_PTRACE
31+
MP_MAX_MESSAGES: 5000
32+
# The app connects without auth (see SPRING_MAIL_* below). These two keep Mailpit accepting the
33+
# message if you point a client at it that insists on AUTH over a plaintext connection.
34+
MP_SMTP_AUTH_ACCEPT_ANY: 1
35+
MP_SMTP_AUTH_ALLOW_INSECURE: 1
5136
healthcheck:
52-
test: ["CMD", "nc", "-z", "localhost", "25"]
53-
interval: 30s
54-
timeout: 10s
37+
# No curl in the image (Alpine + busybox, so wget/nc exist but curl doesn't). `mailpit readyz`
38+
# is what the image bakes into its own default HEALTHCHECK; this override just makes it explicit.
39+
test: ["CMD", "/mailpit", "readyz"]
40+
interval: 10s
41+
timeout: 5s
5542
retries: 5
5643

5744
myapp-main:
@@ -63,7 +50,7 @@ services:
6350
depends_on:
6451
myapp-db:
6552
condition: service_healthy
66-
mailserver:
53+
mailpit:
6754
condition: service_healthy
6855
# Not strictly required to boot, but the demo is useless until Keycloak answers, and this makes
6956
# `up` report the stack as ready only when a Keycloak login can actually be attempted.
@@ -77,16 +64,15 @@ services:
7764
SPRING_DATASOURCE_USERNAME: springuser
7865
SPRING_DATASOURCE_PASSWORD: springuser
7966
SPRING_PROFILES_ACTIVE: docker-keycloak
80-
SPRING_MAIL_HOST: mailserver
81-
SPRING_MAIL_PORT: 25
67+
# Mailpit captures everything the app sends and shows it at http://localhost:8025. It speaks
68+
# plain SMTP on 1025 with no auth and no STARTTLS, so verification and password-reset mail is
69+
# readable without any credentials. Registration verification is left at its base default of
70+
# true (application.yml:113): register, open the web inbox, click the link, log in.
71+
SPRING_MAIL_HOST: mailpit
72+
SPRING_MAIL_PORT: 1025
8273
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH: "false"
8374
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: "false"
8475
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED: "false"
85-
# The mailserver container is a relay with no route to real inboxes, so a verification link
86-
# would never arrive. With this false the framework enables new accounts immediately and you
87-
# can log in straight after registering. To exercise verification instead, set this to true
88-
# and point the SPRING_MAIL_* values above at a real SMTP server.
89-
USER_REGISTRATION_SENDVERIFICATIONEMAIL: "false"
9076
healthcheck:
9177
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/actuator/health"]
9278
interval: 30s
@@ -133,8 +119,5 @@ services:
133119
condition: service_healthy
134120

135121
volumes:
136-
maildata:
137-
mailstate:
138-
maillogs:
139122
userdb:
140123
keycloak:

‎docs/AUTHENTICATION.md‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,20 @@ failed logins and lockouts land in the audit log.
1818
[`register.js`](../src/main/resources/static/js/user/register.js)), which posts JSON to
1919
`POST /user/registration`, not form data.
2020
2. What happens next depends on `user.registration.sendVerificationEmail`:
21-
- `true` (base `application.yml:113`): the account is created disabled, a verification email is sent,
22-
and the browser lands on `/user/registration-pending-verification.html`. The emailed link is
21+
- `true` (base `application.yml:113`, and what both Docker stacks run): the account is created
22+
disabled, a verification email is sent, and the browser lands on
23+
`/user/registration-pending-verification.html`. The emailed link is
2324
`GET /user/registrationConfirm?token=...`, which enables the account. Lost it? Request another at
2425
`/user/request-new-verification-email.html`
2526
([`resend-verification.js`](../src/main/resources/static/js/user/resend-verification.js) posts
26-
`POST /user/resendRegistrationToken`).
27+
`POST /user/resendRegistrationToken`). Under `docker compose up` the message is captured by Mailpit
28+
rather than delivered: open <http://localhost:8025> and click the link there. The resend page itself
29+
is currently broken against `ds-spring-user-framework:5.3.0`: the endpoint binds the full
30+
registration `UserDto`, whose `firstName`/`lastName`/`password`/`matchingPassword` are `@NotBlank`,
31+
so the email-only payload the page posts is rejected with HTTP 400 and no mail goes out.
2732
- `false`: the account is created enabled, the framework logs the user straight in, and the browser
28-
lands on `/user/registration-complete.html`. `application-local.yml-example:131` sets it false and
29-
the Docker demo stack sets `USER_REGISTRATION_SENDVERIFICATIONEMAIL: "false"` (`compose.yaml:85`),
30-
so neither documented run path needs a working SMTP server.
33+
lands on `/user/registration-complete.html`. `application-local.yml-example:131` sets it false, so
34+
the Gradle `local` run path needs no SMTP server at all.
3135
3. Log in at `/user/login.html` ([`login.js`](../src/main/resources/static/js/user/login.js)). The form
3236
posts to `/user/login`; success redirects to `/index.html?messageKey=message.login.success`. Ten
3337
failed attempts lock the account for 30 minutes (`application.yml:146-147`).
@@ -36,7 +40,9 @@ failed logins and lockouts land in the audit log.
3640
`/user/forgot-password-change.html`, which posts `POST /user/savePassword`
3741
([`forgot-password.js`](../src/main/resources/static/js/user/forgot-password.js),
3842
[`reset-password.js`](../src/main/resources/static/js/user/reset-password.js)). Both reset steps need
39-
real mail, unlike registration. To change a password you know, `/user/update-password.html` posts
43+
working mail in every profile: the Docker stacks capture it in Mailpit at <http://localhost:8025>,
44+
and `playwright-test` turns the email off and reads the token through the test API instead
45+
(`application-playwright-test.yml:8`). To change a password you know, `/user/update-password.html` posts
4046
`POST /user/updatePassword`.
4147

4248
## Passkeys
@@ -160,8 +166,8 @@ Open http://localhost:8080/user/login.html, click "Login with Keycloak", sign in
160166
First login creates a local account with provider `KEYCLOAK` and email `demo@example.com`. The realm is
161167
`demo`, not `master`, so every OIDC URL is `/realms/demo/...`; `admin` / `admin` is a master realm
162168
account and cannot sign in to the demo app. The app's own registration form still works in this stack, and
163-
like the `compose.yaml` stack it sets `USER_REGISTRATION_SENDVERIFICATIONEMAIL: "false"`, so an account
164-
registered there is enabled immediately rather than waiting on mail the bundled relay cannot deliver.
169+
like the `compose.yaml` stack it sends the verification email through the bundled Mailpit container: open
170+
<http://localhost:8025>, click the link in the message, and log in with the form.
165171
The compose file sets `SPRING_PROFILES_ACTIVE: docker-keycloak`, and every value in
166172
[`application-docker-keycloak.yml`](../src/main/resources/application-docker-keycloak.yml) comes from an
167173
environment variable in [`keycloak.env`](../keycloak.env): `DS_SPRING_USER_KEYCLOAK_CLIENT_ID`,

‎docs/CONFIGURATION.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,19 @@ Recognized elsewhere (fall back to a demo default when unset):
6363
| `DATABASE_URL`, `DATABASE_USERNAME`, `DATABASE_PASSWORD` | Production datasource (`application-prd.yml:10-12`). |
6464
| `WEBAUTHN_RP_ID`, `WEBAUTHN_RP_NAME`, `WEBAUTHN_ALLOWED_ORIGINS` | WebAuthn relying-party identity in `prd` (`application-prd.yml:41-43`). |
6565
| `DS_SPRING_USER_KEYCLOAK_CLIENT_ID`, `_CLIENT_SECRET`, `_PROVIDER_AUTHORIZATION_URI`, `_PROVIDER_TOKEN_URI`, `_PROVIDER_USER_INFO_URI`, `_PROVIDER_JWK_SET_URI` | Keycloak OAuth2 client and provider endpoints for `docker-keycloak`, consumed in `application-docker-keycloak.yml:19-20,35,48-50`; supplied by [`keycloak.env`](../keycloak.env) when you run `docker-compose-keycloak.yml`. There is no `_PROVIDER_ISSUER_URI`: `issuer-uri` is deliberately left unset, see [`keycloak/README.md`](../keycloak/README.md). |
66-
| `SELINUX_LABEL` | Suffix on the mailserver's bind-mounted config path in `compose.yaml`/`docker-compose-keycloak.yml`. Unset by default; Docker Compose prints a harmless warning about it. |
6766

6867
Any framework property can also be set through Spring's relaxed binding (`SCREAMING_SNAKE_CASE` of
6968
the dotted key). The Docker demo stack (`compose.yaml`) does this for the app container:
70-
`SPRING_DATASOURCE_URL`/`_USERNAME`/`_PASSWORD` (→ `spring.datasource.*`), `SPRING_PROFILES_ACTIVE`,
71-
`SPRING_MAIL_HOST`/`_PORT` and the `SPRING_MAIL_PROPERTIES_MAIL_SMTP_*` keys (→ `spring.mail.*`), and
72-
`USER_REGISTRATION_SENDVERIFICATIONEMAIL` (→ `user.registration.sendVerificationEmail`). The same
73-
pattern works for any other key, e.g. `USER_SECURITY_BCRYPTSTRENGTH` for `user.security.bcryptStrength`.
69+
`SPRING_DATASOURCE_URL`/`_USERNAME`/`_PASSWORD` (→ `spring.datasource.*`), `SPRING_PROFILES_ACTIVE`, and
70+
`SPRING_MAIL_HOST`/`_PORT` plus the `SPRING_MAIL_PROPERTIES_MAIL_SMTP_*` keys (→ `spring.mail.*`). The same
71+
pattern works for any other key, e.g. `USER_SECURITY_BCRYPTSTRENGTH` for `user.security.bcryptStrength` or
72+
`USER_REGISTRATION_SENDVERIFICATIONEMAIL` for `user.registration.sendVerificationEmail`.
7473

7574
## Mail
7675

7776
- `spring.mail.username`, `spring.mail.password`, `spring.mail.host`, `spring.mail.port` (`application.yml:2-6`) configure the SMTP transport used for verification, password-reset, and notification email. The base file's `host` is a placeholder SES endpoint; set real credentials in your profile.
7877
- `user.registration.sendVerificationEmail` (`application.yml:113`) controls whether a new account must click a verification link before it can log in. `false` enables the account immediately at registration.
79-
- The Docker demo stack's `mailserver` service (`compose.yaml`) is a relay only: `SMTP_ONLY: 1` (`compose.yaml:48`) with no route to real inboxes. That stack sets `USER_REGISTRATION_SENDVERIFICATIONEMAIL: "false"` (`compose.yaml:85`) so registered accounts activate immediately instead of waiting on mail nothing will deliver.
78+
- Both Docker stacks (`compose.yaml` and `docker-compose-keycloak.yml`) run a `mailpit` service ([Mailpit](https://mailpit.axllent.org/)) that captures outbound mail instead of delivering it, and serves it as a web inbox on <http://localhost:8025>. The app container reaches it over plain SMTP with `SPRING_MAIL_HOST: mailpit` and `SPRING_MAIL_PORT: 1025`, auth and STARTTLS off. Neither stack overrides `user.registration.sendVerificationEmail`, so registration verification and password reset run their real email flows: read the message in the web inbox and click the link. Nothing leaves the machine, and Mailpit keeps no volume, so `docker compose down` discards the captured mail. The resend-verification page does not work against `ds-spring-user-framework:5.3.0`: `UserAPI.resendRegistrationToken` binds the full registration `UserDto`, whose `firstName`, `lastName`, `password`, and `matchingPassword` are `@NotBlank`, so the email-only payload that `resend-verification.js` posts is rejected with HTTP 400 and no mail is sent. That is a framework-side bug, not a stack setting.
8079
- `user.mail.fromAddress` sets the `From` address on outbound mail; it is set per profile (e.g. `application-local.yml-example:144`), not in the base file.
8180

8281
## Security settings this demo sets

‎docs/DEVELOPMENT.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ that automate the tunnel + proxy pair for the first case. See:
7070
- [`compose.dev.yaml`](../compose.dev.yaml): database only. Started automatically by `bootRun`'s
7171
Docker Compose integration; not meant to be run directly, though `docker compose -f compose.dev.yaml
7272
up -d` works if you want the database without the app.
73-
- [`compose.yaml`](../compose.yaml): the full demo stack: app + MariaDB + a relay-only mail
74-
container. `docker compose up -d` builds the app image (multi-stage [`Dockerfile`](../Dockerfile):
73+
- [`compose.yaml`](../compose.yaml): the full demo stack: app + MariaDB + a Mailpit mail catcher
74+
whose web inbox is on <http://localhost:8025>. `docker compose up -d` builds the app image
75+
(multi-stage [`Dockerfile`](../Dockerfile):
7576
a JDK-21 build stage runs `./gradlew --no-daemon bootJar -x test` (`Dockerfile:14`), a JRE-21 stage runs the resulting jar as a non-root
7677
user) and runs all three. The app container's healthcheck polls `GET /actuator/health`
77-
(`compose.yaml:86-90`), the only actuator endpoint left unauthenticated.
78-
- [`docker-compose-keycloak.yml`](../docker-compose-keycloak.yml): the same app + MariaDB + mail
78+
(`compose.yaml:72-76`), the only actuator endpoint left unauthenticated.
79+
- [`docker-compose-keycloak.yml`](../docker-compose-keycloak.yml): the same app + MariaDB + Mailpit
7980
setup plus a Keycloak container, for testing OIDC login. Start with
8081
`docker compose -f docker-compose-keycloak.yml up -d --build --wait`. See
8182
[`keycloak/README.md`](../keycloak/README.md) for ports, credentials, and the login walkthrough, and

0 commit comments

Comments
 (0)