fix(docker): add missing email and auth environment variables to webapp | selfhoster
✅ Checklist
- [x] I have followed every step in the contributing guide
- [x] The PR title follows the convention.
- [x] I ran and tested the code works
Testing
- Set up fresh v4-beta self-hosted deployment using docker-compose
- Configured
.envwithEMAIL_TRANSPORT=resendand valid Resend API key - Before fix: Magic links appeared in docker logs, no emails received
- After fix: Magic links sent successfully via email
- Tested with both Resend and SMTP configurations
- Verified WHITELISTED_EMAILS properly restricts login access
- Confirmed GitHub OAuth works when AUTH_GITHUB variables are set
Changelog
Added missing environment variables to webapp service in docker-compose.yml:
- Email transport configuration (EMAIL_TRANSPORT, FROM_EMAIL, REPLY_TO_EMAIL, RESEND_API_KEY)
- SMTP configuration variables (commented by default)
- Authentication variables (WHITELISTED_EMAILS, ADMIN_EMAILS, AUTH_GITHUB_CLIENT_ID/SECRET)
- Slack integration variables (ORG_SLACK_INTEGRATION_CLIENT_ID/SECRET)
- Alert email configuration (ALERT_FROM_EMAIL)
Screenshots
⚠️ No Changeset found
Latest commit: 5c31806804ab85ba40b1a61d7421b6330f7270dc
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Walkthrough
Added multiple environment variables to the webapp service in hosting/docker/webapp/docker-compose.yml for auth, email, Slack integration, and SMTP configuration: WHITELISTED_EMAILS, ADMIN_EMAILS, AUTH_GITHUB_CLIENT_ID, AUTH_GITHUB_CLIENT_SECRET, EMAIL_TRANSPORT, FROM_EMAIL, REPLY_TO_EMAIL, RESEND_API_KEY, SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASSWORD, ORG_SLACK_INTEGRATION_CLIENT_ID, ORG_SLACK_INTEGRATION_CLIENT_SECRET, ALERT_FROM_EMAIL. Retained INTERNAL_OTEL_TRACE_LOGGING_ENABLED with whitespace adjustment. Added a trailing newline at the end of the file.
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title Check | ✅ Passed | The title accurately and concisely summarizes the primary change—adding missing email and authentication environment variables to the webapp Docker service—and uses the conventional scope prefix "fix(docker)". The wording is relevant to the changeset and clear to reviewers; the trailing " |
| Description Check | ✅ Passed | The PR description closely follows the repository template by providing the checklist, detailed testing steps with results, and a clear changelog describing the added environment variables. It does omit the leading "Closes # |
| Docstring Coverage | ✅ Passed | No functions found in the changes. Docstring coverage check skipped. |
✨ Finishing touches
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
[!TIP]
👮 Agentic pre-merge checks are now available in preview!
Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
- Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
- Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.
Please see the documentation for more information.
Example:
reviews: pre_merge_checks: custom_checks: - name: "Undocumented Breaking Changes" mode: "warning" instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post.
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
Thanks @unckleg - did you test what happens when people don't set these in their .env?
Thanks @unckleg - did you test what happens when people don't set these in their
.env?
Will continue to work normally since the conditions in the implementation itself.
Will continue to work normally
The reason I ask is because afaik both v1 and v2 docker compose will set those env vars to empty strings if not defined. This combined with schema parsing in env.server.ts might cause issues. The ones you added will be optional but some might require strict enums that exclude empty strings. It's also one of the reasons we didn't add all env vars to the compose file - we'd have to maintain defaults in both schema and compose file. In this case it might be fine, just needs testing.