-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"extends": "../../.markdownlint.json", | ||
"MD041": false, | ||
"MD046": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
```yaml tab="Docker" | ||
# Dynamic Configuration | ||
labels: | ||
- "traefik.http.routers.api.rule=Host(`traefik.domain.com`)" | ||
- "traefik.http.routers.api.service=api@internal" | ||
- "traefik.http.routers.api.middlewares=auth" | ||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0" | ||
``` | ||
|
||
```yaml tab="Docker (Swarm)" | ||
# Dynamic Configuration | ||
deploy: | ||
labels: | ||
- "traefik.http.routers.api.rule=Host(`traefik.domain.com`)" | ||
- "traefik.http.routers.api.service=api@internal" | ||
- "traefik.http.routers.api.middlewares=auth" | ||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0" | ||
# Dummy service for Swarm port detection. The port can be any valid integer value. | ||
- "traefik.http.services.dummy-svc.loadbalancer.server.port=9999" | ||
``` | ||
|
||
```json tab="Marathon" | ||
"labels": { | ||
"traefik.http.routers.api.rule": "Host(`traefik.domain.com`)", | ||
"traefik.http.routers.api.service": "api@internal", | ||
"traefik.http.routers.api.middlewares": "auth", | ||
"traefik.http.middlewares.auth.basicauth.users": "test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0" | ||
} | ||
``` | ||
|
||
```yaml tab="Rancher" | ||
# Dynamic Configuration | ||
labels: | ||
- "traefik.http.routers.api.rule=Host(`traefik.domain.com`)" | ||
- "traefik.http.routers.api.service=api@internal" | ||
- "traefik.http.routers.api.middlewares=auth" | ||
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0" | ||
``` | ||
|
||
```toml tab="File (TOML)" | ||
# Dynamic Configuration | ||
[http.routers.my-api] | ||
rule = "Host(`traefik.domain.com`)" | ||
service = "api@internal" | ||
middlewares = ["auth"] | ||
|
||
[http.middlewares.auth.basicAuth] | ||
users = [ | ||
"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", | ||
"test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0", | ||
] | ||
``` | ||
|
||
```yaml tab="File (YAML)" | ||
# Dynamic Configuration | ||
http: | ||
routers: | ||
api: | ||
rule: Host(`traefik.domain.com`) | ||
service: api@internal | ||
middlewares: | ||
- auth | ||
middlewares: | ||
auth: | ||
basicAuth: | ||
users: | ||
- "test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/" | ||
- "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters