lifecycle: only set prometheus_multiproc_dir in ak wrapper to prevent full disk on worker

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-12 14:44:32 +02:00
parent 22a7c25526
commit 48f96ea55f
2 changed files with 2 additions and 1 deletions

View File

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

View File

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