During build time an application could not reach a database or api from another container.
I am migrating my projects from an older docker server to fresh dokploy server.
When i am deploying during the build time i am getting the error
This is a nextjs app trying to connect to my database. It works if i expose the port to the internet but i really don't want to do that.
On my other server i solved this problem passing the --network parameter to the build docker command so during the build time my apps could communicate with other containers on the same network without any problems.
I am also migrating another project that has a separate API/DB and an nextjs app and during the build of the nextjs app it cannot reachs the api:
What could be a possible solution in these cases?
Thank you
When i am deploying during the build time i am getting the error
This is a nextjs app trying to connect to my database. It works if i expose the port to the internet but i really don't want to do that.
On my other server i solved this problem passing the --network parameter to the build docker command so during the build time my apps could communicate with other containers on the same network without any problems.
I am also migrating another project that has a separate API/DB and an nextjs app and during the build of the nextjs app it cannot reachs the api:
What could be a possible solution in these cases?
Thank you