Add option to skip auto migration

This commit is contained in:
Raphael Michel
2020-11-04 09:48:14 +01:00
parent 8989723145
commit 6af5b3fd5e

View File

@@ -5,6 +5,8 @@ export DATA_DIR=/data/
export HOME=/pretix
export NUM_WORKERS=$((2 * $(nproc --all)))
AUTOMIGRATE=${AUTOMIGRATE:-yes}
if [ ! -d /data/logs ]; then
mkdir /data/logs;
fi
@@ -16,7 +18,9 @@ if [ "$1" == "cron" ]; then
exec python3 -m pretix runperiodic
fi
python3 -m pretix migrate --noinput
if [ "$AUTOMIGRATE" != "skip" ]; then
python3 -m pretix migrate --noinput
fi
if [ "$1" == "all" ]; then
exec sudo -E /usr/bin/supervisord -n -c /etc/supervisord.all.conf