traefik/docs/content/https/include-acme-single-domain-example.md

73 lines
1.7 KiB
Markdown
Raw Normal View History

```yaml tab="Docker"
## Dynamic configuration
labels:
2020-03-13 21:50:05 +00:00
- traefik.http.routers.blog.rule=Host(`example.com`) && Path(`/blog`)
- traefik.http.routers.blog.tls=true
2020-02-17 10:04:04 +00:00
- traefik.http.routers.blog.tls.certresolver=myresolver
```
```yaml tab="Docker (Swarm)"
## Dynamic configuration
deploy:
labels:
2020-03-13 21:50:05 +00:00
- traefik.http.routers.blog.rule=Host(`example.com`) && Path(`/blog`)
- traefik.http.routers.blog.tls=true
2020-02-17 10:04:04 +00:00
- traefik.http.routers.blog.tls.certresolver=myresolver
- traefik.http.services.blog-svc.loadbalancer.server.port=8080"
```
```yaml tab="Kubernetes"
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: blogtls
spec:
entryPoints:
- websecure
routes:
2020-03-13 21:50:05 +00:00
- match: Host(`example.com`) && Path(`/blog`)
kind: Rule
services:
- name: blog
port: 8080
tls:
2020-07-01 12:42:04 +00:00
certResolver: myresolver
```
```json tab="Marathon"
labels: {
2020-03-13 21:50:05 +00:00
"traefik.http.routers.blog.rule": "Host(`example.com`) && Path(`/blog`)",
"traefik.http.routers.blog.tls": "true",
2020-02-17 10:04:04 +00:00
"traefik.http.routers.blog.tls.certresolver": "myresolver",
"traefik.http.services.blog-svc.loadbalancer.server.port": "8080"
}
```
```yaml tab="Rancher"
## Dynamic configuration
labels:
2020-03-13 21:50:05 +00:00
- traefik.http.routers.blog.rule=Host(`example.com`) && Path(`/blog`)
- traefik.http.routers.blog.tls=true
2020-02-17 10:04:04 +00:00
- traefik.http.routers.blog.tls.certresolver=myresolver
```
2020-03-18 23:32:03 +00:00
```toml tab="File (TOML)"
## Dynamic configuration
[http.routers]
[http.routers.blog]
2020-03-13 21:50:05 +00:00
rule = "Host(`example.com`) && Path(`/blog`)"
[http.routers.blog.tls]
2020-02-17 10:04:04 +00:00
certResolver = "myresolver"
```
```yaml tab="File (YAML)"
## Dynamic configuration
http:
routers:
blog:
2020-03-13 21:50:05 +00:00
rule: "Host(`example.com`) && Path(`/blog`)"
tls:
2020-02-17 10:04:04 +00:00
certResolver: myresolver
```