mirror of
https://github.com/jcwimer/docker-swarm-autoscaler
synced 2026-03-24 23:04:43 +00:00
Changed naming
This commit is contained in:
65
swarm-autoscaler-stack.yml
Executable file
65
swarm-autoscaler-stack.yml
Executable file
@@ -0,0 +1,65 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
autoscale:
|
||||
|
||||
services:
|
||||
docker-swarm-autoscaler:
|
||||
image: jcwimer/docker-swarm-autoscaler
|
||||
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-autoscaler
|
||||
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
|
||||
Reference in New Issue
Block a user