Merge pull request 'Align README, docker-compose, .env.template and stale comment with SMTP mailer' (#6) from mailship-0da-readme-config-architecture-and-docker-co-6e1 into main

Reviewed-on: #6
Reviewed-by: matt <matt@lorentz.is>
This commit is contained in:
matt 2026-09-14 16:57:09 +00:00
commit 7cdb84a0a1
6 changed files with 21 additions and 12 deletions

View file

@ -12,11 +12,14 @@ BRAND_LOGO=
INDEXER_RELAYS=purplepag.es,relay.damus.io,relay.nostr.band
DEFAULT_RELAYS=relay.damus.io,nos.lol
SEARCH_RELAYS=relay.nostr.band
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=
# CORS_ORIGIN must be set to the exact origin your browser client runs on
# (e.g. https://app.example.com). There is no wildcard fallback — the server
# will refuse to start without it.
CORS_ORIGIN=
POSTMARK_API_KEY=
POSTMARK_SENDER_ADDRESS=
PORT=4738
DATA_DIR=./data

View file

@ -19,7 +19,7 @@ Flotilla ──HTTP──▶ Mailship (PUT /subscription/email)
UUID in path ├── fetch event from relay
is the auth ├── store in SQLite (dedup)
│
cron fires ──▶ render digest ──▶ Postmark ──▶ email
cron fires ──▶ render digest ──▶ SMTP ──▶ email
```
## Configuration
@ -30,12 +30,15 @@ Flotilla ──HTTP──▶ Mailship (PUT /subscription/email)
| `MAILSHIP_NAME` | ✓ | Name of this Mailship instance |
| `MAILSHIP_URL` | ✓ | Public URL of this instance |
| `BASE_URL` | ✓ | Base URL for callback URLs (same as MAILSHIP_URL typically) |
| `SMTP_HOST` | ✓ | SMTP server hostname |
| `SMTP_PORT` | ✓ | SMTP server port |
| `SMTP_USER` | ✓ | SMTP username |
| `SMTP_PASSWORD` | ✓ | SMTP password |
| `SMTP_FROM` | ✓ | From email address for outgoing mail |
| `EVENT_VIEWER_URL` | | Base URL of the app event links open in (defaults to Flotilla at `https://app.flotilla.social`, or anything handling the same `/spaces/<relay>/<hash>` and `/<nevent>` URL shapes) |
| `BRAND_NAME` | | Name used in email branding (default: `Flotilla`) |
| `BRAND_ACCENT` | | Accent color string used in email branding (default: `#7161FF`) |
| `BRAND_LOGO` | | URL of the logo image shown in the email header. Defaults to `<EVENT_VIEWER_URL>/logo.png`; if empty/unset, a colored brand name is shown instead |
| `POSTMARK_API_KEY` | ✓ | Postmark API key for sending emails |
| `POSTMARK_SENDER_ADDRESS` | ✓ | Verified sender email in Postmark |
| `DEFAULT_RELAYS` | ✓ | Comma-separated list of default relays |
| `INDEXER_RELAYS` | ✓ | Comma-separated list of indexer relays |
| `SEARCH_RELAYS` | ✓ | Comma-separated list of search relays |

View file

@ -10,8 +10,11 @@ services:
- MAILSHIP_NAME=${MAILSHIP_NAME:-Mailship}
- MAILSHIP_URL=${MAILSHIP_URL:?required}
- BASE_URL=${BASE_URL:?required}
- POSTMARK_API_KEY=${POSTMARK_API_KEY:?required}
- POSTMARK_SENDER_ADDRESS=${POSTMARK_SENDER_ADDRESS:?required}
- SMTP_HOST=${SMTP_HOST:?required}
- SMTP_PORT=${SMTP_PORT:?required}
- SMTP_USER=${SMTP_USER:?required}
- SMTP_PASSWORD=${SMTP_PASSWORD:?required}
- SMTP_FROM=${SMTP_FROM:?required}
- DEFAULT_RELAYS=${DEFAULT_RELAYS:-wss://relay.damus.io,wss://relay.primal.net}
- INDEXER_RELAYS=${INDEXER_RELAYS:-wss://purplepag.es,wss://relay.damus.io}
- SEARCH_RELAYS=${SEARCH_RELAYS:-wss://relay.nostr.band}

View file

@ -1,5 +1,3 @@
export type Subscription = {
id: string
key: string

View file

@ -18,7 +18,6 @@ import {
displayPubkey,
getTagValue,
} from '@welshman/util'
import { displayDuration, createElement } from './util.js'
import type { Subscription } from './alert.js'
import { sendDigest } from './mailer.js'

View file

@ -46,8 +46,11 @@ export MAILSHIP_SECRET="$SECRET"
export MAILSHIP_NAME="Mailship Test"
export MAILSHIP_URL="$BASE_URL"
export BASE_URL="$BASE_URL"
export POSTMARK_API_KEY="test"
export POSTMARK_SENDER_ADDRESS="test@test.com"
export SMTP_HOST="localhost"
export SMTP_PORT="587"
export SMTP_USER="test@test.com"
export SMTP_PASSWORD="test"
export SMTP_FROM="test@test.com"
export DEFAULT_RELAYS="wss://relay.damus.io"
export INDEXER_RELAYS="wss://purplepag.es"
export SEARCH_RELAYS="wss://relay.nostr.band"