1
I have an application running on Tomcat where when I upload an image, it saves in "portal/WEB-INF/classes/Static/img" which is a directory within my application. The problem is that when I update the application, Tomcat destroys the directory and recreates and I lose the saved images. I would like to map a directory outside my application (e.g.: /opt/img) to save these images, this is possible via Docker-Compose?
Services: Tomcat: image: Tomcat:8.5-jre8 volumes: - . /Tomcat/Webapps:/usr/local/Tomcat/webapps - . /Tomcat/Logs:/usr/local/Tomcat/logs - . /Tomcat/Webapps/portal/WEB-INF/classes/Static/img:/opt/img - . /Tomcat-users.xml:/usr/local/Tomcat/conf/Tomcat-users.xml - . /server.xml:/usr/local/Tomcat/conf/server.xml ports: - "8090:8080"