[英]Running nginx in a container as reverse proxy with dynamic configuration
I'm trying to setup nginx as a reverse proxy in a container for my containers (Docker Swarm) and static sites which are being hosted on Google Cloud Platform & Netlify 我正在尝试将nginx设置为容器(Docker Swarm)和托管在Google Cloud Platform&Netlify上的静态站点的容器中的反向代理
I'm actually able to run nginx in containers, but I'm really worried about the configurations. 我实际上可以在容器中运行nginx,但是我真的很担心配置。
If image isn't working, please use this link - https://s1.postimg.org/1tv4hka3zz/profitto-architecture_1.png 如果图片无效,请使用此链接-https://s1.postimg.org/1tv4hka3zz/profitto-architecture_1.png
Hej Sanjay. Hej Sanjay。
Have a look at: 看一下:
https://github.com/jwilder/nginx-proxy https://github.com/jwilder/nginx-proxy
https://traefik.io/ https://traefik.io/
The first one is a modified Nginx Reverse Proxy by J.Wilder. 第一个是J.Wilder修改后的Nginx反向代理。 The Second one is a new and native Reverse Proxy created specially for such use cases.
第二个是专门为此类用例创建的新的本地反向代理。
Both are able to listen to the docker.socks and dnynamicly add new containers to the reverse-proxy backend. 两者都能够监听docker.socks并动态添加新容器到反向代理后端。
Regarding your Architecture: Why not running the Reverse-Proxy Containers inside the Swarm Cluster? 关于您的体系结构:为什么不在Swarm集群中运行反向代理容器?
Related to logging, have a Look at the Docker Log-Drivers. 与日志记录相关,请查看Docker Log-Drivers。 You can collect the Logs of all Containers with eg.
您可以使用例如收集所有容器的日志。 fluentd or splunk.
流利或sp弹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.