mirror of
https://github.com/cuigh/swirl
synced 2024-12-28 14:51:57 +00:00
81 lines
1.6 KiB
YAML
81 lines
1.6 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
swirl:
|
|
image: cuigh/swirl
|
|
environment:
|
|
DB_ADDRESS: mongodb://mongo:27017/swirl
|
|
DOCKER_ENDPOINT: tcp://swirl_manager_agent:2375
|
|
AGENTS: swirl_manager_agent,swirl_worker_agent
|
|
ports:
|
|
- "8001:8001"
|
|
networks:
|
|
- net
|
|
deploy:
|
|
replicas: 2
|
|
placement:
|
|
constraints: [ node.role == worker ]
|
|
|
|
manager_agent:
|
|
image: cuigh/socat
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- net
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints: [ node.role == manager ]
|
|
|
|
worker_agent:
|
|
image: cuigh/socat
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- net
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints: [ node.role == worker ]
|
|
|
|
# prometheus:
|
|
# image: prom/prometheus
|
|
# volumes:
|
|
# - prometheus:/prometheus
|
|
# networks:
|
|
# - net
|
|
# deploy:
|
|
# replicas: 1
|
|
# placement:
|
|
# constraints: [ node.labels.app.prometheus == true ]
|
|
|
|
# cadvisor:
|
|
# image: gcr.io/cadvisor/cadvisor
|
|
# volumes:
|
|
# - /:/rootfs:ro
|
|
# - /sys:/sys:ro
|
|
# - /var/lib/docker:/var/lib/docker:ro
|
|
# - /var/run:/var/run:ro
|
|
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
|
# networks:
|
|
# - net
|
|
# deploy:
|
|
# mode: global
|
|
|
|
mongo:
|
|
image: mongo
|
|
volumes:
|
|
- mongo:/data/db
|
|
networks:
|
|
- net
|
|
deploy:
|
|
replicas: 1
|
|
# placement:
|
|
# constraints: [ node.labels.app.mongo == true ]
|
|
|
|
volumes:
|
|
prometheus:
|
|
mongo:
|
|
|
|
networks:
|
|
net: |