Fix: Run migration lock as the correct user (#9604)

This commit is contained in:
Trenton H
2025-04-09 14:15:38 -07:00
committed by GitHub
parent 78822f6121
commit 0fb55f3ae8
2 changed files with 14 additions and 15 deletions

View File

@@ -0,0 +1,7 @@
#!/command/with-contenv /usr/bin/bash
# shellcheck shell=bash
declare -r data_dir="${PAPERLESS_DATA_DIR:-/usr/src/paperless/data}"
# shellcheck disable=SC2164
cd "${PAPERLESS_SRC_DIR}"
exec s6-setlock -n "${data_dir}/migration_lock" python3 manage.py migrate --skip-checks --no-input