version: "3.3" networks: mother: external: true configs: caddy_config: external: true dockerd_config: external: true node_rules: external: true task_rules: external: true services: dockerd-exporter: image: registry.vnfco.ir/library/stefanprodan/caddy networks: - mother environment: - DOCKER_GWBRIDGE_IP=172.18.0.1 configs: - source: dockerd_config target: /etc/caddy/Caddyfile deploy: mode: global resources: limits: memory: 64M reservations: memory: 32M cadvisor: image: registry.vnfco.ir/library/google/cadvisor networks: - mother command: -logtostderr -docker_only volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - /:/rootfs:ro - /var/run:/var/run - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro deploy: mode: global resources: limits: memory: 64M reservations: memory: 32M grafana: image: registry.vnfco.ir/library/stefanprodan/swarmprom-grafana:5.3.4 networks: - mother environment: - GF_SECURITY_ADMIN_USER=nerdguy - GF_SECURITY_ADMIN_PASSWORD=RbBmIu1LCgIqKcMmopc1Ie21+1OKsX1ktNCAeiViNIb6HAKkzjJ+GhZlLysItwgm - GF_USERS_ALLOW_SIGN_UP=false #- GF_SERVER_ROOT_URL=${GF_SERVER_ROOT_URL:-localhost} #- GF_SMTP_ENABLED=${GF_SMTP_ENABLED:-false} #- GF_SMTP_FROM_ADDRESS=${GF_SMTP_FROM_ADDRESS:-grafana@test.com} #- GF_SMTP_FROM_NAME=${GF_SMTP_FROM_NAME:-Grafana} #- GF_SMTP_HOST=${GF_SMTP_HOST:-smtp:25} #- GF_SMTP_USER=${GF_SMTP_USER} #- GF_SMTP_PASSWORD=${GF_SMTP_PASSWORD} volumes: - /volume/grafana:/var/lib/grafana deploy: mode: replicated replicas: 1 placement: constraints: - node.role == manager resources: limits: memory: 128M reservations: memory: 32M alertmanager: image: registry.vnfco.ir/library/stefanprodan/swarmprom-alertmanager:v0.14.0 networks: - mother environment: - SLACK_URL=https://hooks.slack.com/services/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 - SLACK_CHANNEL=alert - SLACK_USER=alertmanager command: - '--config.file=/etc/alertmanager/alertmanager.yml' - '--storage.path=/alertmanager' volumes: - /volume/alertmanager:/alertmanager deploy: mode: replicated replicas: 1 placement: constraints: - node.role == manager resources: limits: memory: 64M reservations: memory: 32M unsee: image: registry.vnfco.ir/library/cloudflare/unsee:v0.8.0 networks: - mother environment: - "ALERTMANAGER_URIS=default:http://alertmanager:9093" deploy: mode: replicated replicas: 1 node-exporter: image: registry.vnfco.ir/library/stefanprodan/swarmprom-node-exporter:v0.16.0 networks: - mother environment: - NODE_ID={{.Node.ID}} volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro - /etc/hostname:/etc/nodename command: - '--path.sysfs=/host/sys' - '--path.procfs=/host/proc' - '--collector.textfile.directory=/etc/node-exporter/' - '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)' - '--no-collector.ipvs' deploy: mode: global resources: limits: memory: 64M reservations: memory: 32M prometheus: image: registry.vnfco.ir/library/stefanprodan/swarmprom-prometheus:v2.5.0 networks: - mother command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--storage.tsdb.retention=${PROMETHEUS_RETENTION:-24h}' volumes: - /volume/prometheus:/prometheus configs: - source: node_rules target: /etc/prometheus/swarm_node.rules.yml - source: task_rules target: /etc/prometheus/swarm_task.rules.yml deploy: mode: replicated replicas: 1 placement: constraints: - node.role == manager resources: limits: memory: 1G reservations: memory: 128M caddy: image: registry.vnfco.ir/library/stefanprodan/caddy ports: - "3000:3000" - "9090:9090" - "9093:9093" - "9094:9094" networks: - mother environment: - ADMIN_USER=nerdguy - ADMIN_PASSWORD=RbBmIu1LCgIqKcMmopc1Ie21+1OKsX1ktNCAeiViNIb6HAKkzjJ+GhZlLysItwgm configs: - source: caddy_config target: /etc/caddy/Caddyfile deploy: mode: replicated replicas: 1 placement: constraints: - node.role == manager resources: limits: memory: 128M reservations: memory: 64M healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000"] interval: 5s timeout: 1s retries: 5