From a30be7bc1e3beea0171c81ce9ec406ecc3c65e74 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Thu, 26 Sep 2024 18:54:28 +0200 Subject: [PATCH] feat: add env variable to disable db migrations on startup (#1179) --- scripts/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index 41779881b..386a48cee 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,5 +1,10 @@ # Run migrations -node ./db/migrations/$DB_DIALECT/migrate.cjs ./db/migrations/$DB_DIALECT +if [ $DB_MIGRATIONS_DISABLED = "true" ]; then + echo "DB migrations are disabled, skipping" +else + echo "Running DB migrations" + node ./db/migrations/$DB_DIALECT/migrate.cjs ./db/migrations/$DB_DIALECT +fi # Start nginx proxy # 1. Replace the HOSTNAME in the nginx template file