mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2026-07-31 07:49:07 -04:00
- Renamed `ExternalSunTimesThrottle` to `ExternalSunriseSunsetThrottle` for clarity. - Added `SunriseSunsetAPI` view to handle sunrise and sunset data retrieval. - Implemented caching for sunrise/sunset data using `get_or_fetch_cached`. - Created new service functions for fetching sunrise/sunset data from the external API. - Updated related tests to ensure proper functionality and caching behavior. - Removed deprecated sun times handling from the `LocationViewSet` for cleaner code.
2.6 KiB
2.6 KiB
Advanced Configuration
Optional environment variables for security hardening, performance tuning, and authentication behavior. For the complete reference, see Environment Variables.
Authentication behavior
| Variable | Default | Description |
|---|---|---|
ACCOUNT_EMAIL_VERIFICATION |
none |
none, optional, or mandatory email verification for new accounts |
FORCE_SOCIALACCOUNT_LOGIN |
False |
When True, disables password login — social/OIDC providers only |
SOCIALACCOUNT_ALLOW_SIGNUP |
False |
Allow new accounts via social providers even when DISABLE_REGISTRATION=True |
Related: Social Auth, Disable Registration, SMTP Email.
Rate limiting
Enable in production to protect against abuse:
ENABLE_RATE_LIMITS=True
Per-endpoint overrides (all optional):
| Variable | Default | Endpoint |
|---|---|---|
RATE_LIMIT_USER |
10000/hour |
Authenticated API requests |
RATE_LIMIT_IMAGE_PROXY |
60/minute |
Image proxy |
RATE_LIMIT_IMAGE_IMPORT |
12/minute |
Image import |
RATE_LIMIT_EXTERNAL_GEOCODE |
120/minute |
External geocoding |
RATE_LIMIT_EXTERNAL_RECOMMENDATIONS |
30/minute |
Recommendations |
RATE_LIMIT_EXTERNAL_WIKIPEDIA |
60/minute |
Wikipedia lookups |
RATE_LIMIT_EXTERNAL_SUNRISE_SUNSET |
30/minute |
Sunrise/sunset API |
Performance
| Variable | Default | Description |
|---|---|---|
GUNICORN_WORKERS |
2 |
Gunicorn worker count. Use 1 on small VPS instances; (2 × CPU cores) + 1 on larger servers. |
SKIP_WORLD_DATA |
unset | Set to 1 to skip the first-boot download-countries import. Saves RAM on low-memory hosts; world travel data can be imported later. |
The installer offers SKIP_WORLD_DATA=1 automatically when it detects limited RAM.
Multi-factor authentication
MFA (TOTP) is configured per-user in the app, not via environment variables:
- Log in and open Settings → Security
- Enable Multi-Factor Authentication
- Scan the QR code with an authenticator app
Mobile QR login
AdventureLog supports QR-based mobile login from Settings → Security. No server-side configuration is required.
Cloud billing (hosted only)
These variables apply only to the hosted AdventureLog cloud service, not self-hosted installs:
| Variable | Description |
|---|---|
CLOUD_MODE |
Enable cloud billing features |
CLOUD_TRIAL_DAYS |
Trial period length |
STRIPE_* |
Stripe payment integration keys |