ecs-nginx-proxy
ecs-nginx-proxy copied to clipboard
Duplicate values with Mutliple containers
After the earlier commit's #14 #15, I started adding some of the nginx properties via environment variables. It works fine when you have one container running under nginx proxy but when you have multiple containers, values are getting duplicated.
example:
container -1:
key: NGINX_GEN_keepalive_timeout value: 120s
container -2:
key: NGINX_GEN_keepalive_timeout value: 120s
when ecs-gen writes the nginx.conf file it's adding same value twice.
server {
server_name xxxxxxxxxxx;
keepalive_timeout 120s;
keepalive_timeout 120s;
listen 80;
access_log /var/log/nginx/access.log vhost;
location / {
proxy_pass http://xxxxxxxxxxx;
}
}
How can we avoid duplication and have only one key value? I am not familiar with go html template so any help is appreciated.
@codesuki @smaclell
Thanks for the report. I will have a look when I find the time. @smaclell since you know the code well, maybe you have an idea.