# Local development mode. Production rejects disk fallback and requires S3 + Redis.
NODE_ENV=development
# Database
DATABASE_URL=postgres://postgres:postgres@localhost:5432/wisp
# Firehose
FIREHOSE_SERVICE=wss://bsky.network
# Optional fallback relay used when the primary fails 3 times in a row
FIREHOSE_SERVICE_SECONDARY=
FIREHOSE_MAX_CONCURRENCY=5
FIREHOSE_MAX_PENDING_EVENTS=10000
FIREHOSE_DRAIN_GRACE_MS=30000
# Production defaults to leader election. Keep it enabled for every replica.
LEADER_ELECTION=false
# The production election runs in a separate process so a stalled worker is killed
# before either Redis or Postgres authority is handed to a standby.
LEADERSHIP_SUPERVISOR_ENABLED=false
# Set true in production; the Docker image installs this compiled executable.
FIREHOSE_SUPERVISOR_PATH=/usr/local/bin/firehose-supervisor
FIREHOSE_WATCHDOG_PATH=/usr/local/bin/firehose-watchdog
SUPERVISOR_COMMAND_TIMEOUT_MS=2000
LEADER_TTL_MS=30000
LEADER_RENEW_INTERVAL_MS=10000
LEADER_POLL_INTERVAL_MS=5000
CURSOR_SAVE_INTERVAL_MS=5000
# Redis is required in production for leader election, durable revalidation,
# and cache invalidation. Use rediss:// when Redis is outside a trusted network.
REDIS_URL=redis://localhost:6379
WISP_REVALIDATE_FAILURE_BACKOFF_SECONDS=600
WISP_REVALIDATE_STREAM_MAXLEN=10000
WISP_REVALIDATE_DEDUPE_TTL_SECONDS=60
# Poison messages are quarantined after this many delivery attempts.
WISP_REVALIDATE_MAX_ATTEMPTS=3
WISP_REVALIDATE_DEADLINE_MS=300000
WISP_REVALIDATE_TRANSFER_BUDGET_BYTES=1073741824
WISP_REVALIDATE_RETRY_BACKOFF_BASE_MS=60000
WISP_REVALIDATE_RETRY_BACKOFF_MAX_MS=900000
WISP_REVALIDATE_DLQ_STREAM=wisp:revalidate:dlq
WISP_REVALIDATE_DLQ_STREAM_MAXLEN=10000
# S3 Storage. S3_BUCKET is required outside development/test. Use an HTTPS
# endpoint unless it is a localhost development endpoint.
S3_BUCKET=
S3_REGION=auto
S3_ENDPOINT=
S3_PREFIX=sites/
S3_FORCE_PATH_STYLE=true
# Static AWS credentials must be supplied as a pair. Leave both empty to use
# the AWS SDK default provider chain (for example an IAM workload role).
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# Disk fallback is only permitted for an explicit local development/test setup.
# Set NODE_ENV=development or test when enabling this. Never enable it in production.
FIREHOSE_ALLOW_DISK_STORAGE=true
# Health check server
HEALTH_PORT=3001
# For local disk fallback (when S3_BUCKET is empty)
CACHE_DIR=./cache/sites