Prisma env variable error in prisma schema

Viewed 966

When I try to run my docker container setting the url database prisma connects to, like so:

docker run plants_api -e SERVER_PORT=3000 -e DATABASE_URL="mysql://root:mypass@localhost:3306/prisma"

I get the following error:

(node:17) UnhandledPromiseRejectionWarning: Error: error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:7
   |
 6 |   provider = "mysql"
 7 |   url      = env("DATABASE_URL")

Any help?

0 Answers
Related