Skip to content

Commit 2bc3cee

Browse files
committed
docs: update readme
1 parent 43345b3 commit 2bc3cee

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

readme.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
11
Fork from [traefik-umami-plugin](https://github.com/1cedsoda/traefik-umami-plugin)
2+
3+
4+
# Installation
5+
To [add this plugin to traefik](https://plugins.traefik.io/install) reference this repository as a plugin in the static config.
6+
The version references a git tag.
7+
8+
```yaml
9+
experimental:
10+
plugins:
11+
traefik-tianji-plugin:
12+
moduleName: "github.com/msgbyte/traefik-tianji-plugin"
13+
version: "v1.0.0"
14+
```
15+
```toml
16+
[experimental.plugins.traefik-tianji-plugin]
17+
moduleName = "github.com/msgbyte/traefik-tianji-plugin"
18+
version = "v1.0.0"
19+
```
20+
With the plugin installed, you can configure a middleware in a dynamic configuration such as a `config.yml` or docker labels.
21+
Inside `traefik-tianji-plugin` the plugin can be configured.
22+
23+
Only `tianjiHost` and `websiteId` options are required to get started.
24+
The middleware can then be used in a [router](https://doc.traefik.io/traefik/routing/routers/#middlewares_1). Remember to reference the correct [provider namespace](https://doc.traefik.io/traefik/providers/overview/#provider-namespace).
25+
26+
27+
```yaml
28+
http:
29+
middlewares:
30+
my-tianji-middleware:
31+
plugin:
32+
traefik-tianji-plugin:
33+
tianjiHost: "https://app-tianji.msgbyte.com"
34+
websiteId: "<your-website-id>"
35+
```
36+
```toml
37+
[http.middlewares]
38+
[http.middlewares.tianji.plugin.traefik-tianji-plugin]
39+
tianjiHost = "https://app-tianji.msgbyte.com"
40+
websiteId = "<your-website-id>"
41+
```

0 commit comments

Comments
 (0)