草庐IT

postgresql - 在 Docker Compose 中更改 postgres 容器服务器端口

我正在尝试使用Dockercompose在远程服务器上部署第二个数据库容器。此postgresql服务器在端口5433上运行,而不是第一个postgresql容器使用的5432。当我设置应用程序时,我得到这个错误输出:web_1|django.db.utils.OperationalError:couldnotconnecttoserver:Connectionrefusedweb_1|Istheserverrunningonhost"db"(172.17.0.2)andacceptingweb_1|TCP/IPconnectionsonport5433?我的dockercompose

postgresql - 在 Docker Compose 中更改 postgres 容器服务器端口

我正在尝试使用Dockercompose在远程服务器上部署第二个数据库容器。此postgresql服务器在端口5433上运行,而不是第一个postgresql容器使用的5432。当我设置应用程序时,我得到这个错误输出:web_1|django.db.utils.OperationalError:couldnotconnecttoserver:Connectionrefusedweb_1|Istheserverrunningonhost"db"(172.17.0.2)andacceptingweb_1|TCP/IPconnectionsonport5433?我的dockercompose