Skip to content

Duplicate values with Mutliple containers #16

Open
@Madhu1512

Description

@Madhu1512

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions