Skip to content

Commit 46fbd7d

Browse files
committed
fix: correct SMTP_HOST default for Docker Compose
SMTP_HOST=localhost in .env was overriding the docker-compose.yml default of "maildev" (the Docker service name). Inside a container, localhost refers to the container itself — not the MailDev container. Comment out SMTP_HOST and add a clear note explaining when to use localhost (local dev without Docker) vs leaving it unset (Docker).
1 parent 6f121b7 commit 46fbd7d

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

.env.example

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ AEGIS_PORT=8080
2222
# AEGIS_BIND=127.0.0.1
2323

2424
# ── Agent & Domain ───────────────────────────────────────────────
25-
# Base domain for subdomain-based org resolution (optional)
26-
# e.g., "aegis.io" means orgs are accessed via acme.aegis.io
27-
# Leave empty to use X-Org-Slug header instead (dev mode)
28-
# AEGIS_BASE_DOMAIN=
25+
# Base domain for subdomain-based org resolution.
26+
# In production: aegis.io → orgs accessed via acme.aegis.io
27+
# In development: lvh.me → orgs accessed via acme.lvh.me:8080
28+
# (*.lvh.me resolves to 127.0.0.1 — no /etc/hosts changes needed)
29+
# Leave empty to use X-Org-Slug header instead (header-only mode).
30+
AEGIS_BASE_DOMAIN=lvh.me
2931

3032
# ── CORS ─────────────────────────────────────────────────────────
3133
# Allowed CORS origins (comma-separated)
@@ -34,9 +36,19 @@ AEGIS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:8080
3436
# ── SMTP (Email) ─────────────────────────────────────────────────
3537
# In development, MailDev runs via Docker Compose (web UI: http://localhost:1080)
3638
# In production, configure a real SMTP provider (SendGrid, SES, Mailgun, etc.)
37-
SMTP_HOST=localhost
39+
#
40+
# NOTE: When running with Docker Compose, leave SMTP_HOST commented out.
41+
# The compose file defaults to 'maildev' (the Docker service name).
42+
# Only set SMTP_HOST=localhost when running the Go server directly (without Docker).
43+
# SMTP_HOST=localhost
3844
SMTP_PORT=1025
3945
SMTP_USERNAME=
4046
SMTP_PASSWORD=
4147
SMTP_FROM=noreply@aegis.local
4248
SMTP_TLS=false
49+
50+
# ── Logging ──────────────────────────────────────────────────────
51+
# Log level: debug, info, warn, error (default: info)
52+
LOG_LEVEL=info
53+
# Log format: text (human-readable) or json (structured for log aggregation)
54+
LOG_FORMAT=text

0 commit comments

Comments
 (0)