2018-01-04 07:54:28 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
swirl:
|
|
|
|
image: cuigh/swirl
|
|
|
|
environment:
|
2021-12-06 12:24:22 +00:00
|
|
|
DB_ADDRESS: mongodb://mongo:27017/swirl
|
2018-01-04 07:54:28 +00:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
ports:
|
2021-12-06 12:24:22 +00:00
|
|
|
- "8001:8001"
|
2018-01-04 07:54:28 +00:00
|
|
|
networks:
|
|
|
|
- net
|
|
|
|
deploy:
|
|
|
|
replicas: 1
|
|
|
|
placement:
|
|
|
|
constraints: [node.role == manager]
|
|
|
|
|
|
|
|
mongo:
|
|
|
|
image: mongo
|
|
|
|
volumes:
|
|
|
|
- mongo:/data/db
|
|
|
|
networks:
|
|
|
|
- net
|
|
|
|
deploy:
|
|
|
|
replicas: 1
|
|
|
|
# placement:
|
|
|
|
# constraints: [node.hostname == mongo]
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mongo:
|
|
|
|
|
|
|
|
networks:
|
|
|
|
net:
|