From fb5c9c6ab0ee93276349c73e15ee20bb23aa25b6 Mon Sep 17 00:00:00 2001 From: staffadmin Date: Sun, 28 Jul 2024 16:27:39 +0200 Subject: [PATCH] [swarmdash] --- swarm.yml | 106 +++++++++++++++--------------------------------------- 1 file changed, 29 insertions(+), 77 deletions(-) diff --git a/swarm.yml b/swarm.yml index 08b3f2d..36aa1da 100644 --- a/swarm.yml +++ b/swarm.yml @@ -249,100 +249,52 @@ - "traefik.http.routers.whoami-https.middlewares=privatevpn" networks: - public - swarmpit: - image: swarmpit/swarmpit:latest - environment: - - SWARMPIT_DB=http://db:5984 - - SWARMPIT_INFLUXDB=http://influxdb:8086 + swarm-dashboard: + image: mohsenasm/swarm-dashboard:latest volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - networks: - - public - - agent_network - ulimits: - nofile: - soft: 20000 - hard: 40000 + - /var/run/docker.sock:/var/run/docker.sock + environment: + TZ: "your_timezone" + ENABLE_AUTHENTICATION: "false" + ENABLE_HTTPS: "false" + NODE_EXPORTER_SERVICE_NAME_REGEX: "node-exporter" + CADVISOR_SERVICE_NAME_REGEX: "cadvisor" deploy: - resources: - limits: - cpus: '0.50' - memory: 1024M - reservations: - cpus: '0.25' - memory: 512M placement: constraints: - node.role == manager labels: - "traefik.enable=true" - - "traefik.docker.network=public" - "traefik.http.routers.swarmpit-https.rule=Host(`swarmpit.jingoh.private`)" - "traefik.http.routers.swarmpit-https.entrypoints=websecure" - "traefik.http.routers.swarmpit-https.service=swarmpit" - "traefik.http.services.swarmpit.loadbalancer.server.port=8080" - "traefik.http.routers.swarmpit-https.tls=true" - "traefik.http.routers.swarmpit-https.middlewares=privatevpn" - db: - image: couchdb:2.3.1 - volumes: - - db-data:/opt/couchdb/data networks: - - agent_network - deploy: - labels: - - "traefik.enable=false" - - "traefik.http.services.swarmpit-db.loadbalancer.server.port=5984" - resources: - limits: - cpus: '0.30' - memory: 512M - reservations: - cpus: '0.15' - memory: 256M - placement: - constraints: - - node.role == manager - influxdb: - image: influxdb:1.7 + - public + node-exporter: + image: quay.io/prometheus/node-exporter:v1.6.1 volumes: - - influx-data:/var/lib/influxdb - networks: - - agent_network - deploy: - labels: - - "traefik.enable=false" - - "traefik.http.services.swarmpit-influxdb.loadbalancer.server.port=8086" - resources: - reservations: - cpus: '0.3' - memory: 128M - limits: - cpus: '0.6' - memory: 512M - placement: - constraints: - - node.role == manager - agent: - image: swarmpit/agent:latest - environment: - - DOCKER_API_VERSION=1.35 - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - networks: - - agent_network + - '/:/host:ro' + command: + - '--path.rootfs=/host' deploy: mode: global - labels: - - "traefik.enable=false" - - "traefik.http.services.swarmpit-agent.loadbalancer.server.port=8080" - resources: - limits: - cpus: '0.10' - memory: 64M - reservations: - cpus: '0.05' - memory: 32M + networks: + - public + cadvisor: + image: gcr.io/cadvisor/cadvisor:v0.47.2 + volumes: + - /:/rootfs:ro + - /var/run:/var/run:rw + - /sys:/sys:ro + - /var/lib/docker/:/var/lib/docker:ro + - /dev/disk/:/dev/disk:ro + deploy: + mode: global + networks: + - public networks: public: external: true