File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ AUTO_RELOAD=false
5151# the database connection URL
5252DATABASE_URL = mysql://root@127.0.0.1:3306/project_canis
5353SHADOW_DATABASE_URL = mysql://root@127.0.0.1:3306/project_canis_shadow
54+
55+ # prisma maria db adapter config
56+ PRISMA_MARIA_DB_HOST = 127.0.0.1
57+ PRISMA_MARIA_DB_PORT = 3306
58+ PRISMA_MARIA_DB_CONNECTION_LIMIT = 5
59+
60+ # redis cache
5461REDIS_URL = redis://127.0.0.1:6379
5562
5663# the AI provider to use for AI model access
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ declare global {
66}
77
88const adapter = new PrismaMariaDb ( {
9- host : "localhost ",
10- port : 3306 ,
11- connectionLimit : 5 ,
9+ host : process . env . PRISMA_MARIA_DB_HOST || "127.0.0.1 ",
10+ port : parseInt ( process . env . PRISMA_MARIA_DB_PORT || " 3306" ) ,
11+ connectionLimit : parseInt ( process . env . PRISMA_MARIA_DB_CONNECTION_LIMIT || "5" ) ,
1212} ) ;
1313
1414const prisma = global . _sharedPrisma ?? new PrismaClient ( { adapter } ) ;
You can’t perform that action at this time.
0 commit comments