git actions v2

This commit is contained in:
Davidson Gomes
2024-06-09 14:49:09 -03:00
parent 71a97e047a
commit 14e7a68c32
7 changed files with 11 additions and 76 deletions

16
Docker/deploy_database.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
source ./scripts/env_functions.sh
if [ "$DOCKER_ENV" != "true" ]; then
export_env_vars
fi
if [[ "$DATABASE_PROVIDER" == "postgresql" || "$DATABASE_PROVIDER" == "mysql" ]]; then
export DATABASE_URL
echo "Database URL: $DATABASE_URL"
./node_modules/.bin/prisma generate --schema=prisma/$DATABASE_PROVIDER-schema.prisma
else
echo "Error: Database provider $DATABASE_PROVIDER invalid."
exit 1
fi