lifecycle: allow adjustment of worker cores

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-11 13:20:27 +02:00
parent fb53dc826a
commit 5627848fad
3 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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")

View File

@ -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.