swarm-pilot
Version:
A docker swarm manager
53 lines (52 loc) • 1.84 kB
YAML
services:
swarm-pilot:
image: registry.integral-systems.ch/integral-systems/swarm-pilot:${SERVICE_TAG:-latest}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DEBUG=false
- PROM_HOST=prometheus.int.integral-systems.ch
- PROM_USER=${PROM_USER}
- PROM_PASS=${PROM_PASS}
- PROM_PORT=443
- PROM_SCHEMA=https
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
- TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID}
- BATCH_SIZE=5
- AUTOSCALER_INTERVAL=${AUTOSCALER_INTERVAL:-5}
- ENABLE_AUTOSCALER_LABEL=swarm.autoscaler
- AUTOSCALER_MINIMUM_CPU_LABEL=swarm.autoscaler.minimum_cpu
- AUTOSCALER_CPU_MINIMUM_DEFAULT=${AUTOSCALER_CPU_MINIMUM:-25}
- AUTOSCALER_MAXIMUM_CPU_LABEL=swarm.autoscaler.maximum_cpu
- AUTOSCALER_MAXIMUM_CPU_DEFAULT=${AUTOSCALER_CPU_MAXIMUM:-85}
- AUTOSCALER_MINIMUM_MEM_LABEL=swarm.autoscaler.minimum_mem
- AUTOSCALER_MEM_MINIMUM_DEFAULT=${AUTOSCALER_MEM_MINIMUM:-25}
- AUTOSCALER_MAXIMUM_MEM_LABEL=swarm.autoscaler.maximum_mem
- AUTOSCALER_MAXIMUM_MEM_DEFAULT=${AUTOSCALER_MEM_MAXIMUM:-85}
- AUTOSCALER_MIN_REPLICAS_LABEL=swarm.autoscaler.min_replicas
- AUTOSCALER_MIN_REPLICAS_DEFAULT=1
- AUTOSCALER_MAX_REPLICAS_LABEL=swarm.autoscaler.max_replicas
- AUTOSCALER_MAX_REPLICAS_DEFAULT=10
networks:
- default
deploy:
mode: global
update_config:
parallelism: 1
delay: 5s
order: start-first
resources:
limits:
memory: 256M
cpus: '1'
reservations:
memory: 128M
cpus: "0.5"
restart_policy:
condition: any
delay: 5s
max_attempts: 5
window: 30s
placement:
constraints:
- node.role == manager