Skip to content

A template repository for Traefik plugins

License

Notifications You must be signed in to change notification settings

tomMoulard/traefik-plugin-tmpl

Repository files navigation

Tmpl

Build Status

This is a plugin for Traefik to FIXME.

Usage

To use this template, you should:

  • Replace all tmpl by the name of your plugin:
find -type f -exec sed -i "s/tmpl/[my-plugin-name]/" {} \;
  • Replace all Tmpl by the 'pretty' name of your plugin.
  • Fix all FIXME.

To publish your plugin, you should (see ref):

  • Create a GitHub release.
  • Make sure that the repository is public and have the traefik-plugin topic.

Configuration

Here is an example of a file provider dynamic configuration (given here in YAML), where the interesting part is the http.middlewares section:

# Dynamic configuration

http:
  routers:
    my-tmpl-router:
      rule: host(`tmpl.localhost`)
      service: service-tmpl@file
      middlewares:
        - traefik-plugin-tmpl

  middlewares:
    traefik-plugin-tmpl:
      plugin:
        traefik-plugin-tmpl:
          foo: "bar"

  services:
   service-tmpl:
      loadBalancer:
        servers:
          - url: http://127.0.0.1:8000

Local test

There is a docker-compose.yml file to test the plugin locally:

docker-compose up -d

Then, you can go to http://tmpl.localhost to see the result.

About

A template repository for Traefik plugins

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published