Make roles more reusable
This commit is contained in:
116
roles/quadlets/traefik/dynamic/htpc.yml.j2
Normal file
116
roles/quadlets/traefik/dynamic/htpc.yml.j2
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
# Traefik dynamic configuration for HTPC services
|
||||
# Auto-generated by Ansible - deployed as dotfile
|
||||
|
||||
http:
|
||||
middlewares:
|
||||
redirect-https:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
|
||||
routers:
|
||||
redirect-to-https:
|
||||
rule: "HostRegexp(`{any:.*}`)"
|
||||
entryPoints:
|
||||
- web
|
||||
middlewares:
|
||||
- redirect-https
|
||||
service: noop
|
||||
|
||||
sabnzbd:
|
||||
rule: "PathPrefix(`/sabnzbd`)"
|
||||
service: sabnzbd
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
qbittorrent:
|
||||
rule: "PathPrefix(`/qbittorrent`)"
|
||||
service: qbittorrent
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
sonarr:
|
||||
rule: "PathPrefix(`/sonarr`)"
|
||||
service: sonarr
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
radarr:
|
||||
rule: "PathPrefix(`/radarr`)"
|
||||
service: radarr
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
lidarr:
|
||||
rule: "PathPrefix(`/lidarr`)"
|
||||
service: lidarr
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
lazylibrarian:
|
||||
rule: "PathPrefix(`/lazylibrarian`)"
|
||||
service: lazylibrarian
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
prowlarr:
|
||||
rule: "PathPrefix(`/prowlarr`)"
|
||||
service: prowlarr
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
dashboard:
|
||||
rule: "PathPrefix(`/dashboard`)"
|
||||
service: api@internal
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls: {}
|
||||
|
||||
services:
|
||||
noop:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost"
|
||||
|
||||
sabnzbd:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:8081"
|
||||
|
||||
qbittorrent:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:8082"
|
||||
|
||||
sonarr:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:{{ SONARR__SERVER__PORT | default('8989') }}"
|
||||
|
||||
radarr:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:{{ RADARR__SERVER__PORT | default('7878') }}"
|
||||
|
||||
lidarr:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:{{ LIDARR__SERVER__PORT | default('8686') }}"
|
||||
|
||||
lazylibrarian:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:{{ lazylibrarian_port | default('5299') }}"
|
||||
|
||||
prowlarr:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:{{ PROWLARR__SERVER__PORT | default('9696') }}"
|
||||
19
roles/quadlets/traefik/quadlets.yml
Normal file
19
roles/quadlets/traefik/quadlets.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- name: traefik
|
||||
type: container
|
||||
image: docker.io/traefik:latest
|
||||
pull: newer
|
||||
volumes:
|
||||
- "{{ config_root }}/traefik:/etc/traefik:Z"
|
||||
env:
|
||||
TZ: "{{ tz }}"
|
||||
command:
|
||||
- "--api.dashboard=true"
|
||||
- "--api.insecure=true"
|
||||
- "--providers.file.directory=/etc/traefik/dynamic"
|
||||
- "--providers.file.watch=true"
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--entrypoints.websecure.address=:443"
|
||||
- "--entrypoints.websecure.http.tls.certFile=/etc/traefik/server.crt"
|
||||
- "--entrypoints.websecure.http.tls.keyFile=/etc/traefik/server.key"
|
||||
- "--log.level=INFO"
|
||||
restart_policy: on-failure
|
||||
1
roles/quadlets/traefik/server.crt.j2
Normal file
1
roles/quadlets/traefik/server.crt.j2
Normal file
@@ -0,0 +1 @@
|
||||
{{ traefik_server_cert }}
|
||||
1
roles/quadlets/traefik/server.key.j2
Normal file
1
roles/quadlets/traefik/server.key.j2
Normal file
@@ -0,0 +1 @@
|
||||
{{ traefik_server_key }}
|
||||
Reference in New Issue
Block a user