From 5b057ee4b5eda52c05cea9b4c0f4c6c22c830100 Mon Sep 17 00:00:00 2001 From: Zulfikar Akbar Muzakki Date: Thu, 12 Sep 2024 11:18:28 +0700 Subject: [PATCH] Add worker memory limit (#66) --- deployment/.template.env | 5 ++++- deployment/docker-compose.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/deployment/.template.env b/deployment/.template.env index ebaf6d1..f0c7447 100644 --- a/deployment/.template.env +++ b/deployment/.template.env @@ -32,4 +32,7 @@ DEFAULT_FROM_EMAIL= EMAIL_BACKEND=core.resend_email_backend.ResendBackend # if core.resend_email_backend.ResendBackend -RESEND_API_KEY= \ No newline at end of file +RESEND_API_KEY= + +# Max memory used by worker, default to 3GB +WORKER_MEM_LIMIT=3g \ No newline at end of file diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index 51b2b6c..4e7a0a2 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -124,6 +124,7 @@ services: - db - minio - redis + mem_limit: ${WORKER_MEM_LIMIT:-3g} dev: image: kartoza/${COMPOSE_PROJECT_NAME:-django_project}_dev