1
0
mirror of https://github.com/jcwimer/docker-swarm-autoscaler synced 2026-03-24 15:04:42 +00:00
Files
docker-swarm-autoscaler/swarm-autoscale-stack.yml
2018-10-29 07:10:06 -04:00

66 lines
1.4 KiB
YAML
Executable File

version: "3"
networks:
autoscale:
services:
docker-swarm-autoscale:
image: jcwimer/docker-swarm-autoscale
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- PROMETHEUS_URL=http://prometheus:9090
networks:
- autoscale
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
resources:
limits:
cpus: '0.10'
memory: 128M
reservations:
cpus: '0.10'
memory: 64M
cadvisor:
image: google/cadvisor:${CADVISOR_VERSION:-v0.25.0}
networks:
- autoscale
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /:/rootfs
- /var/run:/var/run
- /sys:/sys
- /var/lib/docker/:/var/lib/docker
deploy:
mode: global
resources:
limits:
cpus: '0.10'
memory: 128M
reservations:
cpus: '0.10'
memory: 64M
prometheus:
image: jcwimer/prometheus-swarm-autoscale
networks:
- autoscale
command: --storage.tsdb.retention 1d --config.file=/etc/prometheus/prometheus.yml
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == worker
resources:
limits:
cpus: '0.50'
memory: 1024M
reservations:
cpus: '0.50'
memory: 128M