|
| 1 | +# Application metadata and runtime environment. |
1 | 2 | APP_NAME=Todo Modulith API |
2 | 3 | APP_ENV=production |
| 4 | +FRONTEND_URL=http://localhost:3000 |
3 | 5 |
|
| 6 | +# Local service credentials used by Docker Compose. |
4 | 7 | POSTGRES_USER=postgres |
5 | 8 | POSTGRES_PASSWORD= |
6 | 9 | POSTGRES_DB=todo_db |
7 | 10 | REDIS_PASSWORD= |
8 | 11 |
|
| 12 | +# Database connection string and SQLAlchemy pool tuning. |
9 | 13 | DATABASE_URL= |
10 | 14 | DATABASE_POOL_SIZE=20 |
11 | 15 | DATABASE_MAX_OVERFLOW=10 |
12 | 16 | DATABASE_POOL_TIMEOUT=30 |
13 | 17 | DATABASE_POOL_RECYCLE=3600 |
14 | 18 |
|
| 19 | +# Redis connection used by shared infrastructure such as rate limiting or caching. |
15 | 20 | REDIS_URL= |
16 | 21 |
|
| 22 | +# JWT signing secret. Change this in every deployed environment. |
17 | 23 | SECRET_KEY= |
18 | 24 |
|
| 25 | +# Maximum request body size in bytes. |
19 | 26 | MAX_REQUEST_SIZE_MB=5242880 #5mb |
20 | 27 |
|
| 28 | +# JWT signing, validation, and token lifetime settings. |
21 | 29 | ALGORITHM=HS256 |
22 | 30 | JWT_ISSUER=todo-modulith-api |
23 | 31 | JWT_AUDIENCE=todo-modulith-client |
24 | 32 | ACCESS_TOKEN_EXPIRE_MINUTES=30 |
25 | 33 | REFRESH_TOKEN_EXPIRE_MINUTES=10080 |
26 | 34 |
|
| 35 | +# API rate limit rule. |
27 | 36 | RATE_LIMIT="100/minute" |
28 | 37 |
|
| 38 | +# CORS settings for browser clients. |
29 | 39 | CORS_ALLOW_ORIGINS=http://localhost:3000 |
30 | 40 | CORS_ALLOW_METHODS=* |
31 | 41 | CORS_ALLOW_HEADERS=* |
32 | 42 |
|
| 43 | +# Content Security Policy header value. |
33 | 44 | SECURITY_CONTENT_SECURITY_POLICY=default-src 'self'; frame-ancestors 'none' |
34 | 45 |
|
| 46 | +# Idempotency key retention time in seconds. |
35 | 47 | IDEMPOTENCY_TTL_SECONDS=86400 |
36 | 48 |
|
| 49 | +# Account lockout thresholds used to slow repeated failed login attempts. |
37 | 50 | ACCOUNT_LOCKOUT_MAX_ATTEMPTS=5 |
38 | 51 | ACCOUNT_LOCKOUT_WINDOW_MINUTES=15 |
39 | 52 | ACCOUNT_LOCKOUT_DURATION_MINUTES=15 |
40 | 53 |
|
| 54 | +# Logging output format for application logs. |
41 | 55 | LOG_FORMAT=json |
42 | 56 |
|
| 57 | +# Email provider selection. Options: ses, sendgrid, smtp. |
| 58 | +EMAIL_PROVIDER=ses |
| 59 | + |
| 60 | +# AWS SES configuration. |
| 61 | +AWS_REGION=us-east-1 |
| 62 | +AWS_ACCESS_KEY_ID= |
| 63 | +AWS_SECRET_ACCESS_KEY= |
| 64 | +SES_FROM_EMAIL=noreply@example.com |
| 65 | + |
| 66 | +# SendGrid configuration. |
| 67 | +SENDGRID_API_KEY= |
| 68 | +SENDGRID_FROM_EMAIL=noreply@example.com |
| 69 | + |
| 70 | +# SMTP configuration for Gmail or other SMTP providers. |
| 71 | +SMTP_HOST= |
| 72 | +SMTP_PORT=587 |
| 73 | +SMTP_USERNAME= |
| 74 | +SMTP_PASSWORD= |
| 75 | +SMTP_FROM_EMAIL=noreply@example.com |
| 76 | +SMTP_USE_TLS=true |
| 77 | + |
| 78 | +# Optional admin and development users created by database seeders. |
43 | 79 | SEED_ADMIN_EMAIL= |
44 | 80 | SEED_ADMIN_PASSWORD= |
45 | 81 | SEED_ADMIN_USERNAME=admin |
|
0 commit comments