Suppose we have 2 swarm nodes and we want to create service A in node 1 and service B in node 2.
We want /app
of every service written in /mnt/XXX
of every node.
is there any clear solution?
I wrote this but in service B in node 2 has data access problems:
version: '3'
services:
A:
volumes:
- '/mnt/data:/app'
deploy:
placement:
constraints:
- "node.labels.host==A"
B:
volumes:
- '/mnt/data:/app'
deploy:
placement:
constraints:
- "node.labels.host==B"