2
0

🐳 Remove wait-for-it script to avoid edge cases issues

This commit is contained in:
Baptiste Arnaud
2023-10-03 17:07:14 +02:00
parent 8b8a23accb
commit ee800d5ba2
3 changed files with 2 additions and 197 deletions

View File

@@ -4,17 +4,9 @@ cd apps/builder;
node -e "const { configureRuntimeEnv } = require('next-runtime-env/build/configure'); configureRuntimeEnv();"
cd ../..;
export DB_HOST=$(echo $DATABASE_URL | awk -F[@//] '{print $4}')
export DB_PORT=$(echo $DATABASE_URL | awk -F[@//:] '{print $5}')
./wait-for-it.sh $DB_HOST:$DB_PORT -t 60 --strict
if [ $? -ne 0 ]; then
echo "Timed out waiting for database to be ready"
exit 1
fi
echo 'Waiting for 15s for database to be ready...';
sleep 15;
./node_modules/.bin/prisma migrate deploy --schema=packages/prisma/postgresql/schema.prisma;
node apps/builder/server.js;