Skip to content

pli01/scalingo-traefik-buildpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scalingo Traefik Buildpack

This buildpack aims at deploying a traefik instance on the Scalingo PaaS platform.

Traefik

traefik

Traefik is modern HTTP reverse proxy and load balancer that makes deploying microservices easy.

Buildpack

This buildpack is inspired from heroku-buildpack-traefik

This buildpack does the following (see bin/compile for details):

  • install traefik (select TRAEFIK_VERSION, default is 2.5.6)
  • start run.sh script at boot time

Usage

To deploy a traefik instance app on scalingo:

  • define BUILDPACK_URL=url_to_this_buildpack or in .buildpacks file
  • define TRAEFIK_var according to traefik documentation
# sample
TRAEFIK_LOG=true
TRAEFIK_LOG_LEVEL=INFO # DEBUG
TRAEFIK_ACCESSLOG=true
TRAEFIK_ENTRYPOINTS_web_FORWARDEDHEADERS_TRUSTEDIPS=10.0.0.0/8 # to trust scalingo LB and Forward X-Forwarded- to backend
# To enable traefik dashboard / api (warning: please use auth middleware to protect the path)
TRAEFIK_API=true
TRAEFIK_API_DASHBOARD=true
TRAEFIK_API_DEBUG=false
TRAEFIK_API_INSECURE=true
  • Then, define a provider for dynamic configuration discovery (route, middleware,backend services), and traefik do the rest .
    • Option 1 (default): define a static file or dynamic provider filefile provider documentation: default is config/dynamic.yml, in your custom app repository

      • The file can be a static file or dynamic file with (go templating variable), see example in config/dynamic.yml.sample
      • You can define another location with TRAEFIK_PROVIDERS_FILE_FILENAME=/app/config/mycustom.yml
    • Option 2: Or define Redis provider redis provider documentation: add a redis addons, and configure TRAEFIK_PROVIDERS_REDIS_ variables, and store as KV your config in redis.

    • Option 3: Or define HTTP provider HTTP provider documentation: configure TRAEFIK_PROVIDERS_HTTP_ variables, and provide your dynamic configuration via an HTTP endpoint.

      • TRAEFIK_PROVIDERS_HTTP_ENDPOINT=https://api.my-conf.domain/config/simple-conf.json

Releases

No releases published

Packages

No packages published

Languages