I need a docker container with Tomcat and ActiveMQ. I managed to do this with the usage of supervisord, and the container is working perfectly and all. But then I thought that the concept is bad, since I don`t want to lose my activeMQ messages when I deploy a new war in Tomcat. So I made 2 containers and linked them, one for activemq and one for tomcat. I can see that tomcat is linked to activemq, but the deployed war in tomcat does nothing with activeMQ.
My question is: any tips how can I check why aren't they communicating, even if the containers are linked, environments created and so on?
Also if someone could link a git hub repo where somebody is using tomcat with activemq linked from 2 different containers?
Also if some of you knows a good practice bloog, related to usage of activemq in docker, I am worried about the lost messages when recreating a container.
From my point of view a docker container is something which should be able to be build from an image in the exact same state. With active MQ this is a bit more tricky, I don't know exactly where does activemq save on the disk the messages, and if a shared volume will fix the persistence problem with docker. On the other hand you don`t redeploy that often a container with activemq, but what if it will happen, host restart (-> destroying all containers).. what are the safety measures?