How can I update files from the bonita docker image (i.e. logging.properties)
1 answer
Hello.
For configuration files not stored in the database (e.g. logging.properties), right now, the way to configure them is by using a volume.
For the case of the logging.properties, there is an env property that allows changing its path:
https://documentation.bonitasoft.com/bonita/2021.1/bonita-docker-install...
So it would mean to change the logging properties configuration:
- Starts the image with a volume containing `logging.properties` e.g. with mount point /opt/custom-config/
- Set the env property BONITA_SERVER_LOGGING_FILE tp that path. e.g. -e BONITA_SERVER_LOGGING_FILE=/opt/custom-config/logging.properties
- The volume can be created in a persistent fashion: https://docs.docker.com/storage/volumes/
For other config files, when there are no specific env properties, you can use a custom configuration script:
- Create a script that copies/modify configuration files of the tomcat that you want to change
- Put that script in a volume
- mount that volume in /opt/custom-config.d/
- It will be exected at container first startup
Comments
Thank you, I created a local file /home/ubuntu/custom-config/logging.properties with some logging configuration, then I tried this command:
docker run --name bonita -v /home/ubuntu/custom-config:/opt/custom-config -e "BONITA_SERVER_LOGGING_FILE=/opt/custom-config/logging.properties" -d -p 8081:8080 bonita
The volume is mounted correctly, but the log files have always the same verbosity.
What am I doing wrong? Thanks,