Files
sablier/README.md
Alexis COUVREUR 030e8da427 docs: add features
2021-09-29 14:14:42 +02:00

2.9 KiB

Traefik Ondemand Plugin
Traefik Ondemand Service

Traefik Ondemand Service for traefik-ondemand-plugin to control containers and services.

Github Actions

Features

  • Support for Docker containers
  • Support for Docker swarm mode, scale services
  • Start your container/service on the first request
  • Dynamic loading page (cloudflare or grafana cloud style)
  • Automatic scale to zero after configured timeout upon last request the service received
  • Support container/service healthcheck and will not redirect until service is healthy

Usage

CLI

./traefik-ondemand-service --swarmMode=true

Argument Value Description
swarmMode true,false (default true) Enable/Disable swarm mode. Used to determine the scaler implementation.

Docker

docker run -v /var/run/docker.sock:/var/run/docker.sock -p 10000:10000 ghcr.io/acouvreur/traefik-ondemand-service:latest --swarmode=true

API

GET <service_url>:10000/?name=<service_name>&timeout=<timeout>
Query param Type Description
name string The docker container name, or the swarm service name
timeout time.Duration The duration after which the container/service will be scaled down to 0
Body Status code Description
started 202 Created The container/service is available
starting 201 Accepted The container/service has been scheduled for starting but is not yet available