2
0

💚 Build docker images for postgresql only

Still need to find a way to change the database provider at runtime. For now let's just only enable postgresql for docker deployments

Closes #324
This commit is contained in:
Baptiste Arnaud
2023-02-19 10:09:45 +01:00
parent 621cd58244
commit 8a0155dab8
4 changed files with 9 additions and 13 deletions

View File

@ -2,18 +2,12 @@
ENVSH_ENV=./apps/builder/.env.production ENVSH_OUTPUT=./apps/builder/public/__env.js bash env.sh
if [[ $DATABASE_URL == postgresql://* ]]; then
./node_modules/.bin/prisma generate --schema=packages/db/postgresql/schema.prisma;
else
./node_modules/.bin/prisma generate --schema=packages/db/mysql/schema.prisma;
fi
./node_modules/.bin/prisma generate --schema=packages/db/postgresql/schema.prisma;
echo 'Waiting 5s for db to be ready...';
sleep 5;
if [[ $DATABASE_URL == postgresql://* ]]; then
./node_modules/.bin/prisma migrate deploy --schema=packages/db/postgresql/schema.prisma;
fi
./node_modules/.bin/prisma migrate deploy --schema=packages/db/postgresql/schema.prisma;
node apps/builder/server.js;