# Database Configuration (used by Docker Compose)
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=waypoint
# Application Database URL (used by the application and sqlx)
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}
WAYPOINT_DATABASE__URL=${DATABASE_URL}
WAYPOINT_DATABASE__MAX_CONNECTIONS=60 # Increased for better backfill performance
WAYPOINT_DATABASE__TIMEOUT_SECONDS=30
WAYPOINT_DATABASE__STORE_MESSAGES=false
# Redis Configuration
WAYPOINT_REDIS__URL=redis://localhost:6379
WAYPOINT_REDIS__POOL_SIZE=100 # Increased from 5 to prevent connection exhaustion in backfill
# Farcaster Hub Configuration
# Protocol support: HTTP and HTTPS are both supported
# - HTTPS is used by default when no protocol is specified
# - For production (remote Snapchain): snapchain.farcaster.xyz:3383
# - For local development (native, not Docker): http://localhost:2283
#
# DOCKER NETWORKING:
# If running Waypoint in Docker, DO NOT use "localhost" - it refers to the container itself!
# - For docker-compose (same network): http://snapchain:3381 (use container service name)
# - For standalone Docker: http://host.docker.internal:3381 (Docker Desktop)
# - For Docker on Linux: use host IP or network mode
WAYPOINT_HUB__URL=snapchain.farcaster.xyz:3383
# IMPORTANT: shard_indices is now required for Subscribe API
# Specify which shards to subscribe to as a comma-separated list
# NOTE: Shard 0 is typically used for metadata only. For events, use shards 1+
# Example: Subscribe to shards 1, 2, and 3
# WAYPOINT_HUB__SHARD_INDICES=1,2,3
# Or just a single shard:
# WAYPOINT_HUB__SHARD_INDICES=1
# Subscribe to all available shards (automatically skips shard 0):
# WAYPOINT_HUB__SUBSCRIBE_TO_ALL_SHARDS=true
# Custom headers for authentication and other purposes
# Note: Environment variable names use uppercase with underscores, but the actual header names
# sent will be lowercase with hyphens (e.g., X_API_KEY becomes x-api-key header)
# Example for Snapchain authentication: WAYPOINT_HUB__HEADERS__X_API_KEY=your_api_key_here
# WAYPOINT_HUB__HEADERS__AUTHORIZATION=Bearer your_token_here
# WAYPOINT_HUB__HEADERS__X_CUSTOM_HEADER=custom_value
WAYPOINT_HUB__RETRY_MAX_ATTEMPTS=5
WAYPOINT_HUB__RETRY_BASE_DELAY_MS=100
WAYPOINT_HUB__RETRY_MAX_DELAY_MS=30000
WAYPOINT_HUB__RETRY_JITTER_FACTOR=0.25
WAYPOINT_HUB__RETRY_TIMEOUT_MS=60000
WAYPOINT_HUB__CONN_TIMEOUT_MS=30000
# API Service Configuration
HOST=0.0.0.0
PORT=8080
# Logging
RUST_LOG=info,sqlx=warn
RUST_BACKTRACE=0
WAYPOINT_LOG_FORMAT=json
# StatsD Metrics Configuration
WAYPOINT_STATSD__PREFIX=way_read
WAYPOINT_STATSD__ADDR=localhost:8125
WAYPOINT_STATSD__USE_TAGS=false
WAYPOINT_STATSD__ENABLED=false
# Backfill settings
BACKFILL_CONCURRENCY=50
BACKFILL_BATCH_SIZE=50
# MCP Configuration has been removed temporarily
# Docker Compose Specific Settings
# Leave these commented in .env file - they are only for docker-compose
#WAYPOINT_DATABASE__URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
#WAYPOINT_REDIS__URL=redis://redis:6379