adding another race condition prevention

This commit is contained in:
stevensting
2025-02-16 14:20:32 +01:00
parent 8dcb1f35e8
commit 8761f3dc6e
2 changed files with 11 additions and 9 deletions
+10 -8
View File
@@ -31,15 +31,17 @@ if [ -n "$1" ]; then
echo "Running '$1'"
$1
else
if [ ! -f /loomio/storage/migrations_ran ] && [ "${TASK:-}" = "worker" ]; then
echo "first deploy, running DB setup..."
rake db:setup
touch /loomio/storage/migrations_ran
fi
if [ "${TASK:-}" = "worker" ]; then
if [ ! -f /loomio/storage/migrations_ran ]; then
echo "first deploy, running DB setup..."
rake db:setup
touch /loomio/storage/migrations_ran
fi
echo "running DB migrations..."
rake db:migrate
echo "DB migrations finished"
echo "running DB migrations..."
rake db:migrate
echo "DB migrations finished"
fi
echo "starting loomio!"
/loomio/docker_start.sh