2
0

Docker improvements (#760)

Closes #758 and #716
This commit is contained in:
Baptiste Arnaud
2023-09-04 14:43:48 +02:00
committed by GitHub
parent 5092e142ec
commit 66dc570527
3 changed files with 75 additions and 5 deletions

View File

@ -4,7 +4,17 @@ cd apps/builder;
node -e "const { configureRuntimeEnv } = require('next-runtime-env/build/configure'); configureRuntimeEnv();"
cd ../..;
./wait-for-it.sh $DATABASE_URL -- ./node_modules/.bin/prisma migrate deploy --schema=packages/prisma/postgresql/schema.prisma;
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
./node_modules/.bin/prisma migrate deploy --schema=packages/prisma/postgresql/schema.prisma;
node apps/builder/server.js;