Docker configuration help for redirection of directories

Hi to all.

I am trying to set up ownCloud on Qnap.
After trying official dockers from Qnap and ownCloud and failing due to port changing every time docker is restarted thus preventing linking to outside world. I have tried to set port and failed due to some problem with Qnap GUI.
Then I have turned to YAML configuration. First try and success…almost. All starts ok, port is not changing but i can not configure directories from host storage to be used as internal. I wish to move config and data directories out of docker and to local storage.
I have tried with:
volumes:
Config:
/share/CACHEDEV1_DATA/nasdata/ownCloud/html/config:/var/www/html/config
Data
/share/CACHEDEV1_DATA/nasdata/ownCloud/html/data:/var/www/html/data

That did not work.
then i have used:
services:
volumes:

  • /share/CACHEDEV1_DATA/nasdata/ownCloud/html/config:/var/www/html/config
  • /share/CACHEDEV1_DATA/nasdata/ownCloud/html/data:/var/www/html/data

and that did not work.

Then I have tried what can be found in documentation about external volume but that did not sit well even that yaml file was validated.

Can someone help me?