Documents
configuration
configuration
Type
External
Status
Published
Created
Feb 21, 2026
Updated
Mar 5, 2026
Updated by
Dosu Bot
Source
View

Configuration#

Overdue uses environment variables for configuration. All variables are prefixed with OVERDUE_. With Docker Compose, set them in docker-compose.yml under environment.

Environment variables#

Core#

VariableDefaultDescription
OVERDUE_APP_NAMEOverdueApplication display name
OVERDUE_DEBUGfalseEnable debug mode
OVERDUE_DATABASE_URLsqlite+aiosqlite:///./overdue.dbDatabase connection string
OVERDUE_SECRET_KEYinsecure defaultSecret key for JWT signing -- set a strong value in production
OVERDUE_HOST0.0.0.0Server bind address
OVERDUE_PORT8000Server port
OVERDUE_ALLOWED_ORIGINS["*"]CORS allowed origins

Authentication#

VariableDefaultDescription
OVERDUE_TOKEN_EXPIRY_MINUTES60Library card (JWT) expiry in minutes
OVERDUE_TOKEN_REFRESH_WINDOW_MINUTES15Window before expiry when refresh is allowed
OVERDUE_WEBHOOK_SECRET""Secret for bulletin (webhook) signature verification

Game balance#

These control how fast the game moves. The defaults create a fast demo experience. For realistic daily gameplay, set decay to 86400 and streak cooldown to 86400.

VariableDefaultDescription
OVERDUE_DEWEY_DECAY_SECONDS10Seconds per decay unit (10 = fast demo, 86400 = daily)
OVERDUE_DEWEY_DECAY_RATE3Points lost per decay unit
OVERDUE_DEWEY_RECALC_INTERVAL_MINUTES15Background recalculation interval
OVERDUE_STREAK_COOLDOWN_SECONDS5Seconds between reviews for streak eligibility (86400 = daily)
OVERDUE_SEARCH_MIN_SCORE0.3Minimum catalog search relevance score
OVERDUE_MAX_VOLUME_SIZE_KB512Maximum volume content size in KB

Example .env file#

OVERDUE_DEBUG=true
OVERDUE_SECRET_KEY=my-secret-key-for-development
OVERDUE_DATABASE_URL=sqlite+aiosqlite:///./dev.db
OVERDUE_DEWEY_DECAY_SECONDS=86400
OVERDUE_STREAK_COOLDOWN_SECONDS=86400

Docker Compose#

The docker-compose.yml includes sensible defaults. Override them in the environment section:

services:
  overdue:
    environment:
      OVERDUE_SECRET_KEY: "your-production-secret"
      OVERDUE_DEWEY_DECAY_SECONDS: "86400"
      OVERDUE_STREAK_COOLDOWN_SECONDS: "86400"

Production notes#

  • Always set a strong OVERDUE_SECRET_KEY -- the default is insecure
  • Use a production database like PostgreSQL instead of SQLite
  • Set OVERDUE_ALLOWED_ORIGINS to your frontend domain(s)
  • Set OVERDUE_DEBUG=false
  • Set OVERDUE_DEWEY_DECAY_SECONDS=86400 and OVERDUE_STREAK_COOLDOWN_SECONDS=86400 for daily gameplay