smebberson / docker-alpine

Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
MIT License
596 stars 186 forks source link

Add support for consul-template #11

Closed matthewvalimaki closed 8 years ago

matthewvalimaki commented 8 years ago

I would recommend adding consul-template to alpine-consul-base as it is integral part of Consul itself.

This setup should provide 100% automatic way to enable consul-template when proper configuration exists.

user-consul-nginx-nodejs has nginx default.conf which should be updated to utilize consul-template with s6 service definition.

If this proposition is supported I can work on the pull request.

matthewvalimaki commented 8 years ago

A note: All additional user added templates should be placed in sub folders of /etc/consul-template/templates/ to support VOLUME (for example VOLUME /etc/consul-template/templates/my-test-templates). Reason for this is: suppose one has a data container with templates and if VOLUME /etc/consul-template were done base image templates, if any, would stop working. Using a sub folder should not be a problem because templates can be declared individually, for example: consul-template -template "/etc/consul-template/templates/my-test-templates/nginx.ctmpl:/etc/nginx/conf.d/default.conf".

smebberson commented 8 years ago

@matthewvalimaki, this will be a great addition! A PR would be fantastic. Thanks for offering to do the work. I agree with everything you've written above. Let me know if you need a hand.