All backend configuration is loaded from TOML files — no environment variables, no .env files. The Settings class (app/settings.py) reads files in this order, each layer overriding the previous:
config.toml — base settings, committed to git (no secrets)
# Copy to secrets.toml and fill in real values.# cp secrets.example.toml secrets.toml## Required keys (no defaults in config.toml):# SECRET_KEY — JWT signing key, min 32 characters# MONGODB_URL — full connection string with credentials## GitHub Actions: create secrets.toml from repository secrets:# cat > backend/secrets.toml << EOF# SECRET_KEY = "${{ secrets.JWT_SECRET_KEY }}"# MONGODB_URL = "${{ secrets.MONGODB_URL }}"# EOF## Kubernetes: store as a Secret and mount at /app/secrets.tomlSECRET_KEY="CHANGE_ME_min_32_chars_long_!!!!"MONGODB_URL="mongodb://root:rootpassword@mongo:27017/integr8scode?authSource=admin"
For production, mount secrets.toml from a Kubernetes Secret at /app/secrets.toml. In CI, generate it from repository secrets (see the template comments for an example).
# Integr8sCode backend configuration (development defaults).# Secrets (SECRET_KEY, MONGODB_URL credentials) live in secrets.toml (gitignored).# Production: mount secrets.toml from a Kubernetes Secret or generate in CI.# See secrets.example.toml for the required keys.PROJECT_NAME="integr8scode"DATABASE_NAME="integr8scode_db"ALGORITHM="HS256"ACCESS_TOKEN_EXPIRE_MINUTES=1440
Legend
Key
Description
Default
PROJECT_NAME
Application name for logs and metadata
integr8scode
DATABASE_NAME
MongoDB database name
integr8scode_db
SECRET_KEY
JWT signing key, min 32 chars. Lives in secrets.toml
Each worker runs with a small override TOML that sets TRACING_SERVICE_NAME and KAFKA_CONSUMER_GROUP_ID. These are mounted alongside config.toml and secrets.toml in Docker Compose:
config.test.toml is a full config file tuned for fast test execution (lower bcrypt rounds, relaxed rate limits, shorter Kafka timeouts). Tests load it with:
Settings(config_path="config.test.toml")
Secrets are still loaded from secrets.toml. In CI, the workflow copies the example template: