diff --git a/docker-compose.yml b/docker-compose.yml index 180b1ed83..1c30aae77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} # AUTHENTIK_ERROR_REPORTING__ENABLED: "true" + # WORKERS: 2 volumes: - ./media:/media - ./custom-templates:/templates diff --git a/lifecycle/gunicorn.conf.py b/lifecycle/gunicorn.conf.py index e5246bc86..1de4a1c57 100644 --- a/lifecycle/gunicorn.conf.py +++ b/lifecycle/gunicorn.conf.py @@ -51,7 +51,7 @@ logconfig_dict = { if SERVICE_HOST_ENV_NAME in os.environ: workers = 2 else: - workers = cpu_count() * 2 + 1 + workers = int(os.environ.get("WORKERS", cpu_count() * 2 + 1)) threads = 4 warnings.simplefilter("once") diff --git a/website/docs/releases/2021.4.md b/website/docs/releases/2021.4.md index 6ff02b234..15f3e0a1b 100644 --- a/website/docs/releases/2021.4.md +++ b/website/docs/releases/2021.4.md @@ -35,6 +35,10 @@ title: Release 2021.4 - Deprecated Group membership has been removed. +## Minor changes + +- You can now specify the amount of processes started in docker-compose using the `WORKERS` environment variable. + ## Upgrading This release does not introduce any new requirements.