# mode (optional)

| Field | ENV | Default |
|---|---|---|
| `mode` | `MODE` | `dev` |

# base_url (optional)

| Field | ENV | Default |
|---|---|---|
| `base_url` | `BASE_URL`<br>`SITE_URL` | `http://localhost:8000` |

# secret_key

| Field | ENV |
|---|---|
| `secret_key` | `SECRET_KEY` |

# Admin Emails (optional)
Email Address of Instance Admins

| Field | ENV | Examples |
|---|---|---|
| `admin_emails` | `ADMIN_EMAILS` | `admin1@example.com,admin2@example.com` |

> Instance admins can access the admin interface, e.g. to configure App Settings
# Frontend directory (optional)
Directory to serve frontend files from, if you are not using something else to serve them

| Field | ENV |
|---|---|
| `frontend_dir` | `FRONTEND_DIR` |

# Allowed hosts (optional)

| Field | ENV | Default |
|---|---|---|
| `allowed_hosts` | `ALLOWED_HOSTS` | `*` |

# CSRF Trusted Origins (optional)

| Field | ENV | Default |
|---|---|---|
| `csrf_trusted_origins` | `CSRF_TRUSTED_ORIGINS` | `http://127.0.0.1:8000` |

# GeoIP Path (optional)

| Field | ENV |
|---|---|
| `geoip_path` | `GEOIP_PATH` |

# Listen options
## File descriptor (optional)

| Field | ENV |
|---|---|
| `listen.fd` | `LISTEN_FD` |

## Host (optional)

| Field | ENV |
|---|---|
| `listen.host` | `LISTEN_HOST` |

## Port (optional)

| Field | ENV |
|---|---|
| `listen.port` | `LISTEN_PORT` |

## Unix socket (optional)

| Field | ENV |
|---|---|
| `listen.socket` | `LISTEN_SOCKET` |

## Concurrency (optional)
How many web workers

| Field | ENV | Default |
|---|---|---|
| `listen.concurrency` | `LISTEN_CONCURRENCY`<br>`WORKER_COUNT` | `1` |

## request timeout seconds (optional)

| Field | ENV | Default |
|---|---|---|
| `listen.request_timeout_seconds` | `REQUEST_TIMEOUT_SECONDS` | `60` |

# Database options
## Database name

| Field | ENV |
|---|---|
| `database.name` | `DATABASE_NAME` |

## User

| Field | ENV |
|---|---|
| `database.user` | `DATABASE_USER` |

## Password

| Field | ENV |
|---|---|
| `database.password` | `DATABASE_PASSWORD` |

## Host (optional)

| Field | ENV | Default |
|---|---|---|
| `database.host` | `DATABASE_HOST` | `localhost` |

## Port (optional)

| Field | ENV | Default |
|---|---|---|
| `database.port` | `DATABASE_PORT` | `5432` |

## Connection max age (optional)

| Field | ENV | Default |
|---|---|---|
| `database.connection_max_age` | `DATABASE_CONN_MAX_AGE` | `0` |

## database statement query timeout during requests (optional)

| Field | ENV | Default |
|---|---|---|
| `database.request_timeout_seconds` | `REQUEST_DATABASE_TIMEOUT_SECONDS` | `60` |

# Redis options
## Host (optional)

| Field | ENV | Default |
|---|---|---|
| `redis.host` | `REDIS_HOST` | `localhost` |

## Port (optional)

| Field | ENV | Default |
|---|---|---|
| `redis.port` | `REDIS_PORT` | `6379` |

## Unix socket (optional)

| Field | ENV |
|---|---|
| `redis.socket` | `REDIS_SOCKET` |

## Database (optional)

| Field | ENV | Default |
|---|---|---|
| `redis.db` | `REDIS_DB` | `0` |

# Worker options
Options to manage how background tasks are executed
## immediate (optional)
Runs task immediately not in the background, very unlikely you want to enable this

| Field | Default |
|---|---|
| `background_worker.immediate` | `False` |

## count (optional)
How many background workers to run

| Field | ENV | Default |
|---|---|---|
| `background_worker.count` | `BACKGROUND_WORKER_COUNT` | `1` |

## type (optional)
Which type of background worker

| Field | ENV | Default |
|---|---|---|
| `background_worker.type` | `BACKGROUND_WORKER_TYPE` | `thread` |

> You can choose `thread` or `process`.

See https://huey.readthedocs.io/en/latest/consumer.html#worker-types for guidance on these
(we don't support the `greenlet` type).
# Upload options
## dir (optional)

| Field | ENV | Default |
|---|---|---|
| `uploads.dir` | `FILE_UPLOAD_DIR` | `./uploads/` |

## temp_dir (optional)

| Field | ENV |
|---|---|
| `uploads.temp_dir` | `FILE_UPLOAD_TEMP_DIR` |

## permissions (optional)

| Field | ENV |
|---|---|
| `uploads.permissions` | `FILE_UPLOAD_PERMISSIONS` |

## directory_permissions (optional)

| Field | ENV |
|---|---|
| `uploads.directory_permissions` | `FILE_UPLOAD_DIRECTORY_PERMISSIONS` |

# Plugin options
## dir (optional)

| Field | ENV | Default |
|---|---|---|
| `plugins.dir` | `PLUGIN_DIR` | `./plugins/` |

# Sentry options
## dsn (optional)

| Field | ENV |
|---|---|
| `sentry.dsn` | `SENTRY_DSN` |

## environment (optional)

| Field | ENV | Default |
|---|---|---|
| `sentry.environment` | `SENTRY_ENVIRONMENT` | `production` |

## client_dsn (optional)

| Field | ENV |
|---|---|
| `sentry.client_dsn` | `SENTRY_CLIENT_DSN` |

## release (optional)

| Field | ENV |
|---|---|
| `sentry.release` | `SENTRY_RELEASE` |

## release_use_git_rev (optional)

| Field | ENV | Default |
|---|---|---|
| `sentry.release_use_git_rev` | `SENTRY_RELEASE_USE_GIT_REV` | `True` |

# Influxdb options
## host

| Field | ENV |
|---|---|
| `influx_db.host` | `INFLUXDB_HOST` |

## port

| Field | ENV |
|---|---|
| `influx_db.port` | `INFLUXDB_PORT` |

## user

| Field | ENV |
|---|---|
| `influx_db.user` | `INFLUXDB_USER` |

## password

| Field | ENV |
|---|---|
| `influx_db.password` | `INFLUXDB_PASSWORD` |

## database name

| Field | ENV |
|---|---|
| `influx_db.database` | `INFLUXDB_NAME` |

## timeout (optional)

| Field | ENV | Default |
|---|---|---|
| `influx_db.timeout` | `INFLUXDB_TIMEOUT` | `5` |
