Configuration¶
Simple Aircraft Manager is configured via environment variables. Development uses settings.py (SQLite, DEBUG=True). Production uses settings_prod.py, which requires DJANGO_SECRET_KEY and DJANGO_ALLOWED_HOSTS — it will crash intentionally if they are missing.
Required for Production¶
Variable |
Description |
Example |
|---|---|---|
|
Django secret key |
Random 50+ character string |
|
Comma-separated allowed hosts |
|
Generate a secret key:
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
General¶
Variable |
Default |
Description |
|---|---|---|
|
|
Enable debug mode |
|
— |
Trusted origins for CSRF (e.g., |
|
|
Timezone |
|
|
Who can create or import aircraft: |
Database¶
Variable |
Default |
Description |
|---|---|---|
|
|
|
|
|
Database name |
|
|
Database user |
|
— |
Database password |
|
|
Database host |
|
|
Database port |
Superuser Auto-Creation¶
Variable |
Default |
Description |
|---|---|---|
|
— |
Create superuser on startup if set |
|
— |
Superuser password |
|
|
Superuser email |
Aircraft Import / Export (Optional)¶
Controls behaviour for the .sam.zip import/export feature.
Variable |
Default |
Description |
|---|---|---|
|
|
Temporary directory for staged upload files while import validation and processing runs |
|
|
Maximum allowed uncompressed archive size in bytes. Archives exceeding this limit are rejected during validation. |
OIDC Authentication (Optional)¶
OIDC is disabled by default. Set OIDC_ENABLED=true to enable.
Variable |
Default |
Description |
|---|---|---|
|
|
Enable OIDC authentication |
|
— |
OIDC client ID (required if enabled) |
|
— |
OIDC client secret (required if enabled) |
|
— |
OIDC discovery endpoint URL |
|
|
Token signing algorithm |
|
|
OIDC scopes |
|
|
Token expiry in seconds |
When enabled, OIDC and local Django accounts coexist. Users are auto-created on first OIDC login using preferred_username → email local part → sub as the username.
AI Logbook Import (Optional)¶
Enables AI-assisted transcription of scanned maintenance logbook pages.
Variable |
Default |
Description |
|---|---|---|
|
— |
Anthropic API key (enables Claude models) |
|
— |
Ollama instance URL (enables self-hosted models) |
|
|
Ollama request timeout in seconds |
|
(built-in) |
Default model ID for import |
|
— |
JSON array of additional model definitions |
LOGBOOK_IMPORT_EXTRA_MODELS format:
[{"id": "llama3.2-vision", "name": "Llama 3.2 Vision", "provider": "ollama"}]
If neither ANTHROPIC_API_KEY nor OLLAMA_BASE_URL is set, the logbook import feature is inactive.
Plugin System (Optional)¶
Variable |
Default |
Description |
|---|---|---|
|
|
Directory scanned for plugin packages at startup. Any subdirectory containing |
|
— |
Comma-separated Python module names to add directly to |
|
— |
Comma-separated pip requirement specifiers installed at container startup before migrations run (e.g. |
See plugins.md for the complete plugin development guide.
Per-Aircraft Feature Flags¶
Variable |
Default |
Description |
|---|---|---|
|
— |
Comma-separated feature keys to disable globally for all aircraft. Disabled features cannot be re-enabled per aircraft by owners. Valid keys: |
Example — disable oil analysis and fuel tracking instance-wide:
DISABLED_FEATURES=oil_analysis,fuel_consumption
See feature-flags.md for the full feature flag reference.
Testing Configuration¶
Verify production settings without a live database:
DJANGO_SECRET_KEY=test DJANGO_ALLOWED_HOSTS=localhost python manage.py check --settings=simple_aircraft_manager.settings_prod