Does better auth supports Docker hosted local database ?

Helo I am suing docker, and Nexjt,s Here is my setup 1. I am using dockerized posttres which is running and working perfectly with prisma and I tested by seeding (inserting) some randomw data. 2. but when I connect to better auth it shows me one single error which is this below one Model user does not exist in the database. If you haven't generated the Prisma client, you need to run 'npx prisma generate'] { cause: undefined } Here is my docker compose file services: postgres: image: postgres:15 restart: always container_name: database environment: - POSTGRES_DB=deero - POSTGRES_USER=postgres - POSTGRES_PASSWORD=prisma ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data volumes: postgres_data: and Here is my auth.ts configuration object ' import prisma from "@/lib/generated/prisma"; import { betterAuth } from "better-auth"; import { prismaAdapter } from "better-auth/adapters/prisma"; export const auth = betterAuth({ database: prismaAdapter(prisma, { provider: "postgresql", }), emailAndPassword: { enabled: true, }, });` any one tell me if there is anyone way else I should sove this pls
Solution:
Then I will work that and then I use better auth methods like signUp with email or other methods then it gives me that Errro. Did u do this and worked for you ?...
Jump to solution
2 Replies
Vlad
Vlad4w ago
Run npx prisma db push
Solution
Abdifitah Abdulkadir
Then I will work that and then I use better auth methods like signUp with email or other methods then it gives me that Errro. Did u do this and worked for you ?

Did you find this page helpful?