Skip to content

docs(email): simplify MailHog setup for worktree-based local dev - #306

Open
agustin-sanc wants to merge 2 commits into
testingfrom
worktree-groovy-wibbling-thompson
Open

docs(email): simplify MailHog setup for worktree-based local dev#306
agustin-sanc wants to merge 2 commits into
testingfrom
worktree-groovy-wibbling-thompson

Conversation

@agustin-sanc

Copy link
Copy Markdown
Collaborator

Summary

  • .env.template: defaults SMTP to localhost:1025 with blank creds — points all local dev at the shared MailHog (no accidental real Gmail sends, no credentials needed)
  • docker-compose.yml: MailHog host ports now configurable via MAILHOG_UI_PORT / MAILHOG_SMTP_PORT (defaults 18025/11025), so the all-in-Docker path is also conflict-proof
  • README.md: complete rewrite of the email section — shared-inbox model (one MailHog on localhost:1025/8025 for all worktrees in parallel), quick-start one-liner, step-by-step testing guide, note on the Docker alternative

Context

The primary local dev model is pnpm dev (portless) per worktree, mirroring how Postgres works: a shared host service (localhost:1025) with a single inbox at localhost:8025. Since scripts/setup-worktree-db.sh copies the main .env verbatim into each new worktree, setting SMTP once in the main checkout propagates to all worktrees automatically.

The previous setup had SMTP_HOST blank in .env.template, which meant a fresh contributor running pnpm dev would fall through to real Gmail sends using any credentials they had set. Now the template defaults to MailHog.

Test plan

  • Start MailHog if not running: docker run -d --name mailhog -p 1025:1025 -p 8025:8025 mailhog/mailhog
  • Confirm http://localhost:8025 shows the MailHog UI
  • Run pnpm dev and trigger a signup or password-reset flow
  • Verify the email appears in http://localhost:8025 (not sent to a real inbox)
  • Optional: set MAILHOG_UI_PORT=19025 in .env, run docker-compose up, confirm UI at localhost:19025

- .env.template: default SMTP_HOST=localhost, SMTP_PORT=1025, blank creds
  (MailHog needs no auth; real Gmail creds only in prod via Kamal secrets)
- docker-compose.yml: make MailHog host ports overridable via
  MAILHOG_UI_PORT / MAILHOG_SMTP_PORT (default 18025/11025) so the
  all-in-Docker path is also conflict-proof
- README.md: rewrite the email section — shared-inbox model (one MailHog
  on localhost:1025/8025 for all worktrees), quick-start one-liner, step-
  by-step guide to testing email flows, and a note on the Docker alternative
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c611290f-8f61-43be-bb26-1da16070dcfe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-groovy-wibbling-thompson

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant