如何通过一个端口部署多个docker容器,并相互访问?
我面临一些与部署 Docker 化应用程序相关的问题。问题是我的服务器上的端口很少,因此要部署这个 dockerized 应用程序,我必须使用端口 80。但是,这个应用程序有 3 个容器(frontend-react、backend-python、database-Mongo),并且每个容器都有公开其服务的特定端口。它在本地工作,但是当我使用反向代理(IIS)公开前端容器(https://VM_IP -> VM_IP:1000)时,该进程无法找到后端和数据库信息(因为它们位于本地服务器中) ,并且它们不通过 IIS 公开)。那么,是否可以在虚拟机内部设置一个网络(用于连接 back-front-db),然后仅公开一个端口(前端)以便访问完整服务? 感谢您的帮助...
我尝试将 IIS 作为反向代理,将服务中的每个端口连接到我的 IP 地址中的特定路径。但是,我不确定它是否正确,或者是否可以通过 docker 网络解决这个问题
I´m facing some issues related to the deployment of a dockerized application. The problem is that I have few ports on my server, so to deploy this dockerized app I have to use port 80. However, this app has 3 containers (frontend-react, backend-python, database-Mongo), and each one has a specific port to expose its service. It works in local, but when I use a reverse proxy (IIS) to expose the frontend container (https://VM_IP -> VM_IP:1000), the process cant find the backend and database information (because they are in local server, and they are not exposed through IIS). So, is it possible to setup a network inside VM (to connect back-front-db), then expose only one port (frontend) in order to access to the full service?
Thanks for your help...
I tried IIS as reverse proxy, connecting each port from services to a specific path in my IP address. But, I'm not sure if it is correct, or if it is possible to solve this with a docker network
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论