Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Fix issue with DIRECT_DATABASE_URL being required (#1484)

Luke Vella8dc2c3fa50b8
diff --git a/.env.development b/.env.development
index 447800cc7..b785d72fc 100644
--- a/.env.development
+++ b/.env.development
@@ -11,6 +11,9 @@ NEXTAUTH_URL=http://localhost:3000
# A connection string to your Postgres database
DATABASE_URL="postgres://postgres:postgres@localhost:5450/rallly"
+# A connection string to your Postgres database for direct access (used for migrations)
+DIRECT_DATABASE_URL="postgres://postgres:postgres@localhost:5450/rallly"
+
# Required to be able to send emails
diff --git a/scripts/docker-start.sh b/scripts/docker-start.sh
index 7c32da5ab..bb1776128 100755
--- a/scripts/docker-start.sh
+++ b/scripts/docker-start.sh
@@ -1,4 +1,8 @@
#!/bin/sh
set -e
+
+export DIRECT_DATABASE_URL=$DATABASE_URL
+export NEXTAUTH_URL=$NEXT_PUBLIC_BASE_URL
+
prisma migrate deploy --schema=./prisma/schema.prisma
-NEXTAUTH_URL=$NEXT_PUBLIC_BASE_URL node apps/web/server.js
+node apps/web/server.js