From 48f96ea55f97aa0a5bbb64958f47728ea9819ef2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 12 Oct 2021 14:44:32 +0200 Subject: [PATCH] lifecycle: only set prometheus_multiproc_dir in ak wrapper to prevent full disk on worker Signed-off-by: Jens Langhammer --- Dockerfile | 1 - lifecycle/ak | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7cd0ca9bc..324286586 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,7 +83,6 @@ USER authentik ENV TMPDIR /dev/shm/ ENV PYTHONUNBUFFERED 1 -ENV prometheus_multiproc_dir /dev/shm/ ENV PATH "/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/lifecycle" HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 CMD [ "/lifecycle/ak", "healthcheck" ] diff --git a/lifecycle/ak b/lifecycle/ak index f64320d98..06b80c3a4 100755 --- a/lifecycle/ak +++ b/lifecycle/ak @@ -30,6 +30,8 @@ MODE_FILE="/tmp/authentik-mode" if [[ "$1" == "server" ]]; then echo "server" > $MODE_FILE + # We only set prometheus_multiproc_dir for serer, as with the worker it just fills up the disk + export prometheus_multiproc_dir=/dev/shm/ python -m lifecycle.migrate /authentik-proxy elif [[ "$1" == "worker" ]]; then