From 772692577153032b3f27f0b11f8e19869540d836 Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Sun, 5 Apr 2020 23:50:41 -0700 Subject: [PATCH] Run migrations after config file is in place, so it can be properly generated --- docker-run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-run.sh b/docker-run.sh index bf904d45..86ad6c3b 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -13,8 +13,6 @@ sed -i "s#sqlite:///mautrix-telegram.db#sqlite:////data/mautrix-telegram.db#" /d if [ -f /data/mx-state.json ]; then ln -s /data/mx-state.json fi -# Check that database is in the right state -alembic -x config=/data/config.yaml upgrade head if [ ! -f /data/config.yaml ]; then cp mautrix_telegram/example-config.yaml /data/config.yaml @@ -35,5 +33,8 @@ if [ ! -f /data/registration.yaml ]; then exit fi +# Check that database is in the right state +alembic -x config=/data/config.yaml upgrade head + fixperms exec su-exec $UID:$GID python3 -m mautrix_telegram -c /data/config.yaml