mirror of
https://github.com/devkitshq/notifkit.git
synced 2026-10-19 18:24:52 +02:00
48 lines
3.0 KiB
Bash
48 lines
3.0 KiB
Bash
# ── Core ──────────────────────────────────────────────────────────────────────
|
|
NODE_ENV=development
|
|
LOG_LEVEL=debug
|
|
PORT=3000
|
|
# Bind address. 127.0.0.1 keeps the server off the network; use 0.0.0.0 in a container.
|
|
HOST=127.0.0.1
|
|
|
|
# ── Dependencies ──────────────────────────────────────────────────────────────
|
|
# Omit both in development and notifkit starts throwaway containers for you.
|
|
REDIS_URL=redis://localhost:6379
|
|
DATABASE_URL=postgres://platform:platform@localhost:5432/notifkit
|
|
|
|
# ── Auth ──────────────────────────────────────────────────────────────────────
|
|
# Bootstrap key. Full access to every project — mint per-project keys for apps.
|
|
ADMIN_API_KEY=my_super_secret_admin_key
|
|
|
|
# ── Unsubscribe ───────────────────────────────────────────────────────────────
|
|
# Both are required before one-click unsubscribe headers are attached to mail.
|
|
# With either unset, sends still work — they just carry no List-Unsubscribe,
|
|
# which mailbox providers penalise on bulk mail.
|
|
#
|
|
# Where an inbox can reach this API. Not HOST/PORT, which are the bind address
|
|
# behind your proxy.
|
|
PUBLIC_URL=https://notify.example.com
|
|
# Signs unsubscribe tokens. Minimum 16 characters. Treat it as permanent:
|
|
# rotating it breaks every unsubscribe link already sitting in an inbox, and a
|
|
# dead unsubscribe link sends people to the spam button instead.
|
|
UNSUBSCRIBE_SECRET=change_me_to_a_long_random_string
|
|
|
|
# ── Limits ────────────────────────────────────────────────────────────────────
|
|
# Per-user sliding-window cap. `critical` priority bypasses it.
|
|
RATE_LIMIT_PER_HOUR=100
|
|
# Largest segment or topic fan-out. A send exceeding this is rejected whole,
|
|
# not truncated, so raise it before your list grows past it.
|
|
SEGMENT_MAX_USERS=10000
|
|
# In-flight messages a worker will process concurrently.
|
|
WORKER_CONCURRENCY=10
|
|
# Redis stream trim length. The cap on unconsumed backlog.
|
|
QUEUE_MAX_LEN=10000000
|
|
# Postgres pool size, per process. Multiply by your replica count.
|
|
DB_MAX_CONNECTIONS=2
|
|
|
|
# ── Log buffering ─────────────────────────────────────────────────────────────
|
|
# Delivery logs are batched into Postgres. Lower the interval for fresher logs,
|
|
# raise the buffer for fewer writes under load.
|
|
LOG_FLUSH_INTERVAL_MS=500
|
|
LOG_BUFFER_MAX_SIZE=5000
|