ecs-nginx-proxy icon indicating copy to clipboard operation
ecs-nginx-proxy copied to clipboard

Duplicate values with Mutliple containers

Open Madhu1512 opened this issue 6 years ago • 1 comments

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

Madhu1512 avatar Sep 28 '17 01:09 Madhu1512

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.

codesuki avatar Sep 28 '17 01:09 codesuki