I have a docker-compose file where I define nginx, php, flask and each have volumes like this:
version: '3'
services:
flask:
...
volumes:
./foo:/foo/bar
flask:
...
volumes:
./foo:/foo/bar
flask:
...
volumes:
./foo:/foo/bar
So, my question is obvious. Is there a way to define one volume for the 3 services ONLY? There are other services that don't share the same volume, so is it possible to group services and give them one volume definition?