Closed Rizbe closed 6 years ago
If you want to override the configs I would recommend mounting your custom configs over the templates.
The problem is, the mount is done prior to running the bin/start
so they are always overwritten. I'm currently resorting to building an image layer over yours that removes the process_template()
steps but would really appreciate a way to just use config files in a host mount volume instead of them being generated with env vars.
My recommendation was to mount /etc/sensu/templates
Ah right, my bad!
So fully what is happening is all files in https://github.com/sstarcher/docker-sensu/tree/master/templates are processed. If you have a file that overlaps with those files it will get overwritten. If you would like to not use the built in templates you can mount over /etc/sensu/templates
If you want to provide extra templates you can mount and add those to
CONFIG_DIR=/etc/sensu/conf.d
CHECK_DIR=/etc/sensu/check.d
HANDLERS_DIR=/etc/sensu/handlers
Any files in the above directories that end in .tmpl
will be processed and added correctly.
All and all the above customization needs documented. It's a more advanced use case.
When starting the container, if you mount in custom config or even client.json, it's blindly being processed and replaced with the template.