1
0
mirror of https://github.com/Ombi-app/Ombi.git synced 2025-03-12 04:35:27 -07:00

Add traefik v2 example configuration

Stephan Renggli 2020-02-29 15:00:56 +01:00
parent cbc24e061e
commit b16179cefc

@ -11,6 +11,10 @@ Server type:<br>
* [IIS with subdirectory](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#iis-with-subdirectory)
* [IIS with subdomain](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#iis-with-subdomain)
* [Caddy](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#caddy)
* [Traefik](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#traefik)
* [Traefik with subdirectory](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#traefik-with-subdirectory)
* [Traefik with subdomain](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#traefik-with-subdomain)
* [Traefik with subdomain and subdirectory](https://github.com/tidusjar/Ombi/wiki/Reverse-Proxy-Examples#traefik-with-subdomain-and-subdirectory)
## **Nginx:**
To use nginx as a reverse proxy requires no extra modules, but it does require configuring.<br>
@ -245,4 +249,84 @@ _**Note:** the abiosoft image does not include any of the DNS plugins needed for
proxy /ombi 127.0.0.1:5000 {
transparent
}
```
## **Traefik:**
Traefik is the a great reverse proxy option if you are using a container-based setup such as docker compose.<br>
You can find Traefik [here](https://docs.traefik.io/), and their getting started guide [here](https://docs.traefik.io/getting-started/quick-start/).<br>
For more information and examples on the usage of labels in docker compose (specific to traefik) go [here](https://docs.traefik.io/user-guides/docker-compose/basic-example/).<br>
_**Note:** The following configuration examples only apply to traefik version 2 and later._<br>
_**Note 2:** All examples contain additional labels not necessarily required for your setup such as wildcard SSL certificates via Let's Encrypt and SSL related headers._
Adjust the values of `traefik.docker.network=traefik_proxy`, `traefik.http.routers.ombi.entrypoints=https` and ``traefik.http.routers.ombi.rule=Host(`ombi.example.com`)`` to match your specific setup.
### **Traefik With Subdomain**
The following configuration would make Ombi available at https://ombi.example.com.
```yaml
labels:
- traefik.enable=true
- traefik.http.services.ombi.loadbalancer.server.port=3579
- traefik.docker.network=traefik_proxy
- traefik.http.routers.ombi.rule=Host(`ombi.example.com`)
- traefik.http.routers.ombi.entrypoints=https
- traefik.http.routers.ombi.tls.certresolver=letsencrypt
- traefik.http.routers.ombi.tls.domains[0].main=*.example.com
- traefik.http.routers.ombi.tls.domains[0].sans=example.com
- traefik.http.middlewares.ombi.headers.SSLRedirect=true
- traefik.http.middlewares.ombi.headers.STSSeconds=315360000
- traefik.http.middlewares.ombi.headers.browserXSSFilter=true
- traefik.http.middlewares.ombi.headers.contentTypeNosniff=true
- traefik.http.middlewares.ombi.headers.forceSTSHeader=true
- traefik.http.middlewares.ombi.headers.SSLHost=
- traefik.http.middlewares.ombi.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.ombi.headers.STSPreload=true
- traefik.http.middlewares.ombi.headers.frameDeny=true
```
### **Traefik With Subdirectory**
The following configuration would make Ombi available at https://example.com/ombi.<br>
_**Note:** When using a subdirectory it is essential to use `PathPrefix` instead of `Path`. More information [here](https://docs.traefik.io/routing/routers/#rule), specifically `Path Vs PathPrefix`._
```yaml
labels:
- traefik.enable=true
- traefik.http.services.ombi.loadbalancer.server.port=3579
- traefik.docker.network=traefik_proxy
- traefik.http.routers.ombi.rule=PathPrefix(`/ombi`)
- traefik.http.routers.ombi.entrypoints=https
- traefik.http.routers.ombi.tls.certresolver=letsencrypt
- traefik.http.routers.ombi.tls.domains[0].main=*.example.com
- traefik.http.routers.ombi.tls.domains[0].sans=example.com
- traefik.http.middlewares.ombi.headers.SSLRedirect=true
- traefik.http.middlewares.ombi.headers.STSSeconds=315360000
- traefik.http.middlewares.ombi.headers.browserXSSFilter=true
- traefik.http.middlewares.ombi.headers.contentTypeNosniff=true
- traefik.http.middlewares.ombi.headers.forceSTSHeader=true
- traefik.http.middlewares.ombi.headers.SSLHost=
- traefik.http.middlewares.ombi.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.ombi.headers.STSPreload=true
- traefik.http.middlewares.ombi.headers.frameDeny=true
```
### **Traefik With Subdomain and Subdirectory**
The following configuration would make Ombi available at https://plex.example.com/request.<br>
_**Note:** When using a subdirectory it is essential to use `PathPrefix` instead of `Path`. More information [here](https://docs.traefik.io/routing/routers/#rule), specifically `Path Vs PathPrefix`._
```yaml
labels:
- traefik.enable=true
- traefik.http.services.ombi.loadbalancer.server.port=3579
- traefik.docker.network=traefik_proxy
- traefik.http.routers.ombi.rule=Host(`plex.example.com`) && PathPrefix(`/request`)
- traefik.http.routers.ombi.entrypoints=https
- traefik.http.routers.ombi.tls.certresolver=letsencrypt
- traefik.http.routers.ombi.tls.domains[0].main=*.example.com
- traefik.http.routers.ombi.tls.domains[0].sans=example.com
- traefik.http.middlewares.ombi.headers.SSLRedirect=true
- traefik.http.middlewares.ombi.headers.STSSeconds=315360000
- traefik.http.middlewares.ombi.headers.browserXSSFilter=true
- traefik.http.middlewares.ombi.headers.contentTypeNosniff=true
- traefik.http.middlewares.ombi.headers.forceSTSHeader=true
- traefik.http.middlewares.ombi.headers.SSLHost=
- traefik.http.middlewares.ombi.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.ombi.headers.STSPreload=true
- traefik.http.middlewares.ombi.headers.frameDeny=true
```