QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides handle-to-DID resolution with Redis-backed caching and queue processing.
at 0ce1bed80f0bf3d761fd231ec2f4ddd5efc9d85b 118 lines 4.0 kB view raw
1# QuickDID Environment Configuration Template 2# Copy this file to .env and customize for your deployment 3# 4# IMPORTANT: Never commit .env files with real SERVICE_KEY values 5 6# ============================================================================ 7# REQUIRED CONFIGURATION 8# ============================================================================ 9 10# External hostname for service endpoints (REQUIRED) 11# Examples: 12# - quickdid.example.com 13# - quickdid.example.com:8080 14# - localhost:3007 15HTTP_EXTERNAL=quickdid.example.com 16 17# Private key for service identity (REQUIRED) 18# SECURITY: Generate a new key for each environment 19# NEVER commit real keys to version control 20SERVICE_KEY=did:key:YOUR_PRIVATE_KEY_HERE 21 22# ============================================================================ 23# NETWORK CONFIGURATION 24# ============================================================================ 25 26# HTTP server port (default: 8080) 27HTTP_PORT=8080 28 29# PLC directory hostname (default: plc.directory) 30# Use "plc.directory" for production 31PLC_HOSTNAME=plc.directory 32 33# HTTP User-Agent header (optional) 34# Default: quickdid/{version} (+https://github.com/smokesignal.events/quickdid) 35# USER_AGENT=quickdid/1.0.0 (+https://quickdid.example.com) 36 37# Custom DNS nameservers (optional, comma-separated) 38# Examples: 8.8.8.8,8.8.4.4 or 1.1.1.1,1.0.0.1 39# DNS_NAMESERVERS= 40 41# Additional CA certificates (optional, comma-separated paths) 42# CERTIFICATE_BUNDLES= 43 44# ============================================================================ 45# CACHING CONFIGURATION 46# ============================================================================ 47 48# Redis URL for caching (optional but recommended for production) 49# Examples: 50# - redis://localhost:6379/0 51# - redis://user:pass@redis.example.com:6379/0 52# - rediss://secure-redis.example.com:6380/0 53# REDIS_URL=redis://localhost:6379/0 54 55# TTL for in-memory cache in seconds (default: 600 = 10 minutes) 56# Lower = fresher data, higher = better performance 57# Range: 60-3600 recommended 58CACHE_TTL_MEMORY=600 59 60# TTL for Redis cache in seconds (default: 7776000 = 90 days) 61# Recommendations: 62# - 86400 (1 day) for frequently changing data 63# - 604800 (1 week) for balanced performance 64# - 7776000 (90 days) for stable data 65CACHE_TTL_REDIS=86400 66 67# ============================================================================ 68# QUEUE CONFIGURATION 69# ============================================================================ 70 71# Queue adapter type (default: mpsc) 72# Options: 73# - mpsc: In-memory queue (single instance) 74# - redis: Distributed queue (multi-instance) 75# - noop: Disable queue (testing only) 76QUEUE_ADAPTER=mpsc 77 78# Redis URL for queue operations (optional) 79# Falls back to REDIS_URL if not specified 80# Use when separating cache and queue Redis instances 81# QUEUE_REDIS_URL= 82 83# Redis key prefix for queues (default: queue:handleresolver:) 84# Useful for namespacing when sharing Redis 85QUEUE_REDIS_PREFIX=queue:handleresolver: 86 87# Redis blocking timeout in seconds (default: 5) 88# Lower = more responsive, higher = less polling 89QUEUE_REDIS_TIMEOUT=5 90 91# Worker ID for queue operations (optional) 92# Default: auto-generated UUID 93# Examples: worker-001, prod-us-east-1, $(hostname) 94# QUEUE_WORKER_ID= 95 96# Buffer size for MPSC queue (default: 1000) 97# Increase for high-traffic deployments 98QUEUE_BUFFER_SIZE=1000 99 100# ============================================================================ 101# LOGGING 102# ============================================================================ 103 104# Rust log level 105# Options: trace, debug, info, warn, error 106# Production: info or warn 107# Development: debug 108RUST_LOG=info 109 110# ============================================================================ 111# DEVELOPMENT OVERRIDES (uncomment for local development) 112# ============================================================================ 113 114# HTTP_EXTERNAL=localhost:3007 115# SERVICE_KEY=did:key:z42tmZxD2mi1TfMKSFrsRfednwdaaPNZiiWHP4MPgcvXkDWK 116# RUST_LOG=debug 117# CACHE_TTL_MEMORY=60 118# CACHE_TTL_REDIS=300