You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project my-project that contains a Postgres database called db, and a compose app.
Dokploy tells me the internal hostname of the database is, say, myproject-db-123456.
When I use that hostname in a container in the compose app, I get an error saying: could not translate host name "myproject-db-123456" to address
The only way I've been able to get containers in the compose app to see the database is add a networks: dokploy-network option in docker-compose putting the containers on the dokploy-network that Dokploy creates when a domain is added to the compose app.
Given that dokploy-network is external-facing, I probably don't want to be doing that, do I? So what settings do I add to my docker-compose so they can see a database that has been set up in the same project? What network are databases on?
This is the docker-compose I use, with the dokploy-network added:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a project
my-project
that contains a Postgres database calleddb
, and a compose app.Dokploy tells me the internal hostname of the database is, say, myproject-db-123456.
When I use that hostname in a container in the compose app, I get an error saying:
could not translate host name "myproject-db-123456" to address
The only way I've been able to get containers in the compose app to see the database is add a
networks: dokploy-network
option in docker-compose putting the containers on thedokploy-network
that Dokploy creates when a domain is added to the compose app.Given that
dokploy-network
is external-facing, I probably don't want to be doing that, do I? So what settings do I add to my docker-compose so they can see a database that has been set up in the same project? What network are databases on?This is the docker-compose I use, with the dokploy-network added:
Beta Was this translation helpful? Give feedback.
All reactions