Docker volume from host directory with docker-compose

  docker, docker-compose, docker-volume, java

Is it possible to link the directory from the project where the docker-compose file is located?
I want to link the folder where the input data for the program to work in the container and also the output data that another program can read

Source: Docker Questions