Config¶
Full Example¶
[database]
db_url = "$DATABASE_URL"
schema_path = "src/schema.py"
migrations_dir = "./migrations"
pool_min_size = 2
pool_max_size = 5
[email]
site_name = "My App"
site_url = "https://app.example.com"
from_email = "noreply@example.com"
smtp_host = "smtp.example.com"
smtp_port = 587
smtp_user = "$SMTP_USER"
smtp_password = "$SMTP_PASSWORD"
[storage]
endpoint_url = "https://s3.amazonaws.com"
public_urls = { assets = "https://assets.example.com" }
access_key_id = "$AWS_ACCESS_KEY_ID"
secret_access_key = "$AWS_SECRET_ACCESS_KEY"
region = "us-east-1"
[auth.native]
enable_signup = true
enable_confirmation = true
enable_magic_link = false
[auth.native.jwt]
secret = "$JWT_SECRET"
algorithm = "HS256"
access_token_expire_minutes = 15
refresh_token_expire_days = 7
[auth.native.google_oauth]
client_id = "$GOOGLE_CLIENT_ID"
client_secret = "$GOOGLE_CLIENT_SECRET"
redirect_uri = "https://app.example.com/auth/callback/google"
[kv.valkey]
addresses = [["localhost", 6379]]
password = "$VALKEY_PASSWORD"
[payments]
api_key = "$STRIPE_SECRET_KEY"
webhook_secret = "$STRIPE_WEBHOOK_SECRET"
[queue.celery]
broker_url = "$CELERY_BROKER_URL"
result_backend = "$CELERY_RESULT_BACKEND"
task_default_queue = "default"
[[queue.schedules]]
name = "daily-digest"
task = "send_digest"
cron = "0 9 * * *"
Environment Variables¶
Any string value starting with $ is resolved from the environment:
db_url = "$DATABASE_URL"
Missing env vars raise ConfigError at load time.
Section Reference¶
[database]¶
|
|
PostgreSQL connection URL (required) |
|
|
Read-replica URL |
|
|
Path to schema module (required) |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Default |
[email]¶
|
|
Name shown in emails (required) |
|
|
Base URL for links (required) |
|
|
Sender address (required) |
|
|
SMTP server (required) |
|
|
SMTP port (required) |
|
|
SMTP username (required) |
|
|
SMTP password (required) |
[storage]¶
|
|
S3-compatible API endpoint |
|
|
Public URL base per bucket, used by |
|
|
AWS access key |
|
|
AWS secret key |
|
|
Default |
[auth.native]¶
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Default |
[auth.native.jwt]¶
|
|
Signing secret (required) |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
JWT |
|
|
JWT |
[auth.clerk]¶
|
|
Clerk secret key (required) |
|
|
Custom JWT verification key |
|
|
Allowed |
[kv.valkey]¶
|
|
Default |
|
|
Valkey username |
|
|
Valkey password |
|
|
Default |
|
|
|
[payments]¶
|
|
Stripe secret key (required) |
|
|
Stripe webhook secret |
|
|
Default |
|
|
Default |
[queue.celery]¶
|
|
Broker URL (required) |
|
|
Result backend URL |
|
|
Default |
|
|
Default |
[queue.vercel]¶
|
|
Vercel API token (required) |
|
|
Vercel team ID |
|
|
Vercel project ID |
|
|
Default |
[[queue.schedules]]¶
|
|
Schedule name (required) |
|
|
Task identifier (required) |
|
|
Cron expression (mutually exclusive with |
|
|
Interval in seconds |
|
|
JSON payload sent with each invocation |
|
|
Target queue name |
|
|
Webhook path (Vercel) |