From c66270ad9d91afc0ae8672e4274fbc2fc6ccda7a Mon Sep 17 00:00:00 2001 From: ephraimduncan Date: Mon, 28 Sep 2026 09:38:46 +0000 Subject: [PATCH] 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. --- docker/start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/start.sh b/docker/start.sh index 2598eae83..7121790ba 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -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