mirror of
https://github.com/documenso/documenso.git
synced 2026-09-29 16:24:30 +10:00
fix: use the database url when the direct url is not set
The Docker start script runs Prisma migrations. The Prisma schema reads `NEXT_PRIVATE_DIRECT_DATABASE_URL`, and the migrations stopped with error P1012 when the variable was not set. If the variable is empty, the start script sets it to `NEXT_PRIVATE_DATABASE_URL`. This agrees with the documentation and with docker/production/compose.yml.
This commit is contained in:
@@ -24,6 +24,9 @@ printf "🏥 Health check: http://localhost:3000/api/health\n"
|
||||
printf "📊 Certificate status: http://localhost:3000/api/certificate-status\n"
|
||||
printf "👥 Community: https://github.com/documenso/documenso\n\n"
|
||||
|
||||
# The Prisma schema requires a direct URL. Without a connection pooler, it is the same as the database URL.
|
||||
export NEXT_PRIVATE_DIRECT_DATABASE_URL="${NEXT_PRIVATE_DIRECT_DATABASE_URL:-$NEXT_PRIVATE_DATABASE_URL}"
|
||||
|
||||
printf "🗄️ Running database migrations...\n"
|
||||
npx prisma migrate deploy --schema ../../packages/prisma/schema.prisma
|
||||
|
||||
|
||||
Reference in New Issue
Block a user