feat(docker): add SMTP configuration for n8n in production compose file#18
Conversation
- Added environment variables for SMTP configuration in `docker-compose.prod.yml` to enable email functionality for n8n. - Included required variables for SMTP host, port, user, password, sender, and SSL/TLS settings. These changes enhance the n8n service by integrating email capabilities for notifications and communications.
WalkthroughThe Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🔍 Vulnerabilities of
|
| digest | sha256:2905427283d21c70c6765472526826cccc41e8482c3ac1d9324bb0dadcf01cd3 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 243 MB |
| packages | 1628 |
📦 Base Image node:20-alpine
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docker-compose.prod.yml (1)
14-15: Review default SMTP host and port
The defaults (email-smtp.us-east-1.amazonaws.comon port 587) assume AWS SES in us-east-1. For multi-region deployments or alternate SMTP providers, these could mislead operators. Consider requiringN8N_SMTP_HOST(and optionallyN8N_SMTP_PORT) or clearly documenting these defaults.Apply this diff to make the host required:
- - N8N_SMTP_HOST=${N8N_SMTP_HOST:-email-smtp.us-east-1.amazonaws.com} + - N8N_SMTP_HOST=${N8N_SMTP_HOST:?N8N_SMTP_HOST is required}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker-compose.prod.yml(1 hunks)
🔇 Additional comments (2)
docker-compose.prod.yml (2)
16-18: Validate required SMTP credentials and sender
Using:?ensuresN8N_SMTP_USER,N8N_SMTP_PASS, andN8N_SMTP_SENDERare set at startup—this fail-fast approach is good. Please confirm that these sensitive values are injected via secure secrets (e.g., Docker secrets or a protected.envfile) rather than exposed in logs or version control.
19-20: Clarify SSL/TLS flags usage
BothN8N_SMTP_SSLandN8N_SMTP_TLSare provided, but many SMTP clients treat SSL (implicit TLS on port 465) and STARTTLS (TLS on port 587) as mutually exclusive. Verify that n8n respects these flags correctly (e.g.,SSL=true→ port 465,TLS=true→ STARTTLS on port 587) to avoid connection failures.
- Added environment variables for SMTP configuration in `.env.example` to support email functionality for n8n in production. - Included necessary variables for SMTP host, port, user, password, sender, and SSL/TLS settings. These changes enhance the n8n service by enabling email capabilities for notifications and communications.
|



docker-compose.prod.ymlto enable email functionality for n8n.These changes enhance the n8n service by integrating email capabilities for notifications and communications.