Looking for a way to put the same volume paths into one place in docker compose file

I link the related post containing the link to the docs