lukevella / rallly

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
https://rallly.co
GNU Affero General Public License v3.0
3.68k stars 350 forks source link

Environment variable not found: DIRECT_DATABASE_URL. #1439

Open RichardHausgartner opened 3 days ago

RichardHausgartner commented 3 days ago

Describe the bug

Prisma CLI Version : 5.22.0
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database

Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Environment variable not found: DIRECT_DATABASE_URL.
  -->  prisma/schema.prisma:4
   | 
 3 |   url          = env("DATABASE_URL")
 4 |   directUrl    = env("DIRECT_DATABASE_URL")
   | 

Validation Error Count: 1
[Context: getConfig]

Prisma CLI Version : 5.22.0

To Reproduce Steps to reproduce the behavior:

  1. Pull the latest commit https://github.com/lukevella/rallly/commit/279fdd30b7c15b5c9c3c019503d1175ebb7b363d
  2. Build the container and run it
  3. See error above

Additional context I've added as a workaround the variable DIRECT_DATABASE_URL to my .env file, and set it the same value as DATABASE_URL. This works, but maybe this is not necessary?