Closed t3easy closed 2 years ago
You can use getenv()
in the config, so you should actually already be able to do this: https://icinga.com/docs/icinga-2/latest/doc/18-library-reference/#getenv
You can use
getenv()
in the config, so you should actually already be able to do this: https://icinga.com/docs/icinga-2/latest/doc/18-library-reference/#getenv
Good point! I have configured ido-mysql and other feature like this now and it works perfectly.
As Icinga 2 config can be very complex, I think it would be better to generate config from templates and environment variables like the official nginx image does, instead of writing hole config files in environment variables like in the Icinga Web 2 Image.
https://github.com/nginxinc/docker-nginx/blob/1.21.6/entrypoint/20-envsubst-on-templates.sh
Templates must be stored outside of the data volume, as they could change on every start of the container.