mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-07 03:36:09 -06:00
Allow extending INSTALLED_APPS via environment
This allows a user to add "apps" (aka parsers) through the environment.
Especially useful when using Docker, and adding a test-parser.
Usage:
```yaml
services:
webserver:
environment:
PAPERLESS_APPS: paperless_tika.apps.PaperlessTikaConfig
```
You can add more by separating them with a `,`:
```yaml
PAPERLESS_APPS: app1,app2
```
This commit is contained in:
@@ -69,6 +69,8 @@ SCRATCH_DIR = os.getenv("PAPERLESS_SCRATCH_DIR", "/tmp/paperless")
|
|||||||
# Application Definition #
|
# Application Definition #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
env_apps = os.getenv("PAPERLESS_APPS") if os.getenv("PAPERLESS_APPS") else []
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
"whitenoise.runserver_nostatic",
|
"whitenoise.runserver_nostatic",
|
||||||
|
|
||||||
@@ -95,7 +97,7 @@ INSTALLED_APPS = [
|
|||||||
|
|
||||||
"django_q",
|
"django_q",
|
||||||
|
|
||||||
]
|
] + env_apps
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||||
|
|||||||
Reference in New Issue
Block a user