Next.js Discord

Discord Forum

Next 14 app dir api failed to build with docker compose

Unanswered
Black Caiman posted this in #help-forum
Open in Discord
Black CaimanOP
I have a nextjs 14 app with postgres db and drizzle. The api routes arent cached, at least they got export const dynamic = 'force-dynamic' flag. During the container building somehow it needs a connection to the db, and it couldnt reach the outside world. (i have tried with domain, ip)
Local build without docker is working good.
Any suggestion for that?
Why does it need to connect to the db for a build?

0 Replies