Dockerized T3 giving prisma connection errors

Hey! So I am running a docker network where I have srv-cap--kobos-db as a ready and availble database used in other applications. But for some reason, on this specific T3 application, I am getting this:
Can't reach database server at `srv-captain--kobos-db`:`3306`

Please make sure your database server is running at `srv-captain--kobos-db`:`3306`.
PrismaClientInitializationError:
Invalid `prisma.folder.findMany()` invocation:


Can't reach database server at `srv-captain--kobos-db`:`3306`

Please make sure your database server is running at `srv-captain--kobos-db`:`3306`.
at wn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:7003)
Can't reach database server at `srv-captain--kobos-db`:`3306`

Please make sure your database server is running at `srv-captain--kobos-db`:`3306`.
PrismaClientInitializationError:
Invalid `prisma.folder.findMany()` invocation:


Can't reach database server at `srv-captain--kobos-db`:`3306`

Please make sure your database server is running at `srv-captain--kobos-db`:`3306`.
at wn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:7003)
Keep in mind, I have tested connecting to this from other apps and it works. It's just T3 specifically that's failing. I'm using the Dockerfile found here https://create.t3.gg/en/deployment/docker and I am using CapRover as my PaaS where I am passing the database URL in the env. Any ideas? Much appreciated!
Create T3 App
Docker 🚀 Create T3 App
The best way to start a full-stack, typesafe Next.js app.
2 Replies
Sam
SamOP13mo ago
I also bash'd into the docker container and pinged srv-captain--kobos-db and it worked fine. My prisma if it means anything
generator client {
provider = "prisma-client-js"
binaryTargets = ["linux-musl-openssl-3.0.x"]
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["linux-musl-openssl-3.0.x"]
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
CroTweet
CroTweet5mo ago
Have you ever figured this one out? I have the same issue with MySQL setup.
Want results from more Discord servers?
Add your server