I like to use my own volumes in the stack file for the Swarm.
I created a volume called database. I like to use this volume for my database services.
My stack file:
But when I run:
docker stack deploy -c wpstack.yml wordpress
service mysql: undefined volume “database”
So I was wondering, how can you work with volumes in a stack file.