mirror of
https://github.com/cuigh/swirl
synced 2024-12-27 06:13:00 +00:00
91 lines
1.7 KiB
YAML
91 lines
1.7 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
swirl:
|
|
image: cuigh/swirl
|
|
environment:
|
|
DB_ADDRESS: mongodb://<database_address>
|
|
DOCKER_ENDPOINT: tcp://swirl_manager_agent:2375
|
|
AGENTS: swirl_manager_agent,swirl_worker_agent
|
|
networks:
|
|
- net
|
|
ports:
|
|
- "8001:8001"
|
|
deploy:
|
|
replicas: 2
|
|
placement:
|
|
constraints: [ node.role == worker ]
|
|
|
|
manager_agent:
|
|
image: cuigh/socat
|
|
networks:
|
|
- net
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints: [ node.role == manager ]
|
|
|
|
worker_agent:
|
|
image: cuigh/socat
|
|
networks:
|
|
- net
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
deploy:
|
|
mode: global
|
|
placement:
|
|
constraints: [ node.role == worker ]
|
|
|
|
# prometheus:
|
|
# image: prom/prometheus
|
|
# networks:
|
|
# - net
|
|
# volumes:
|
|
# - prometheus:/prometheus
|
|
# configs:
|
|
# - source: prometheus.yml
|
|
# target: /etc/prometheus/prometheus.yml
|
|
# deploy:
|
|
# replicas: 1
|
|
# placement:
|
|
# constraints: [ node.labels.app.prometheus == true ]
|
|
|
|
# cadvisor:
|
|
# image: gcr.io/cadvisor/cadvisor
|
|
# networks:
|
|
# - net
|
|
# volumes:
|
|
# - /:/rootfs:ro
|
|
# - /dev/disk/:/dev/disk:ro
|
|
# - /sys:/sys:ro
|
|
# - /var/run:/var/run:ro
|
|
# - /var/lib/docker:/var/lib/docker:ro
|
|
# privileged: true
|
|
# deploy:
|
|
# mode: global
|
|
#
|
|
# node:
|
|
# image: quay.io/prometheus/node-exporter
|
|
# command:
|
|
# - '--path.rootfs=/host'
|
|
# networks:
|
|
# - host
|
|
# pid: host
|
|
# volumes:
|
|
# - /:/host:ro,rslave
|
|
# deploy:
|
|
# mode: global
|
|
|
|
#volumes:
|
|
# prometheus:
|
|
|
|
#configs:
|
|
# prometheus.yml:
|
|
# external: true
|
|
|
|
networks:
|
|
# host:
|
|
# external: true
|
|
net: |