Closed matthewvalimaki closed 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"
.
@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.
I would recommend adding consul-template to alpine-consul-base as it is integral part of Consul itself.
/etc/consul-template/templates/
./etc/consul-template/conf.d/
defaulting to consul on127.0.0.1:8500
./etc/consul-template/conf.d/
./etc/consul-template/conf.d/
contains template configurations. No need to fire up service that does nothing.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.