hmalphettes / docker-route53-dyndns

Automated DynDNS for Docker containers using docker-gen and Route53
11 stars 10 forks source link

Feature request #2

Open lordnynex opened 8 years ago

lordnynex commented 8 years ago

I'd like to use this with with route53 alias or cname records pointing to an ELB.

I'd prefer to handle nginx routing on my own. Is this possible?

Also, an ideal use case for me would be delegating 2 records to the container. One an A record or CNAME on the private hosted zone (I say cname because the underlying host already has an A record, so an alias record pointing to it is preferable). The other being an optional public ALIAS or CNAME to an ELB or router node.

hmalphettes commented 8 years ago

Nginx routing: no nginx routing takes place here. The environment variables are using the same name than what https://github.com/jwilder/nginx-proxy reads so they can be used in combination.

To support what you are asking for one can write a custom https://github.com/hmalphettes/docker-route53-dyndns/blob/master/cli53routes.tmpl and mount it inside the container:

docker run -v custom_cli53routes.tmpl:/app/cli53routes.tmpl \
    -v /var/run/docker.sock:/tmp/docker.sock
    -e AWS_ACCESS_KEY_ID=ABC -e AWS_SECRET_ACCESS_KEY=DEF
    -t hmalphettes/docker-route53-dyndns

Inside the template anything is possible really.

Note that in the default template comma separated values are supported:

VIRTUAL_HOSTS=foo.myzone.com,foo.myprivatezone

Does this answer your question?