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__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
# AUTHENTIK_ERROR_REPORTING__ENABLED: "true" # AUTHENTIK_ERROR_REPORTING__ENABLED: "true"
# WORKERS: 2
volumes: volumes:
- ./media:/media - ./media:/media
- ./custom-templates:/templates - ./custom-templates:/templates

View file

@ -51,7 +51,7 @@ logconfig_dict = {
if SERVICE_HOST_ENV_NAME in os.environ: if SERVICE_HOST_ENV_NAME in os.environ:
workers = 2 workers = 2
else: else:
workers = cpu_count() * 2 + 1 workers = int(os.environ.get("WORKERS", cpu_count() * 2 + 1))
threads = 4 threads = 4
warnings.simplefilter("once") warnings.simplefilter("once")

View file

@ -35,6 +35,10 @@ title: Release 2021.4
- Deprecated Group membership has been removed. - 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 ## Upgrading
This release does not introduce any new requirements. This release does not introduce any new requirements.