-
Notifications
You must be signed in to change notification settings - Fork 4
Scalers
Maximilien Richer edited this page Aug 24, 2016
·
5 revisions
A scaler define how a specific service will be updated and can be used by multiple rules. Available backends for scalers are docker-compose and docker-service.
The docker-compose scaler use the scale
command of docker-compose. As docker-compose don't expose any API, actions are performed by building and execution a raw command.
You must have docker-compose
in your path.
scalers:
scaler-custom-name:
type: "docker-compose-cmd"
# project: usually the name of the folder your started compose into
project: "traefik"
# target: service to scale as named in the compose file
target: "whoami"
# config: path to the config file
config: "docker-compose.yaml"
upper_count_limit: 0 # default, 0 mean unlimited
lower_count_limit: 1 # default
Docker 1.12 introduce swarm mode and services. Services are managed by docker and can be scaled using the API.
docker service create --replicas 1 --name helloworld alpine ping docker.com
Docker daemon 1.12
.
scalers:
scaler-custom-name:
type: "docker-service"
service: "helloworld"
upper_count_limit: 0 # default, 0 mean unlimited
lower_count_limit: 1 # default