Volumen shared with host and container

What is the best option in docker compose to create a persistent volume of host inside of container, for example for jboss eap container,

You can’t create a persistent volume inside of the container, as that’s destroyed when you stop the container running. You create a persistent volume on the server you’re running docker on instead. At least, this is what I think you mean.