This commit is contained in:
2023-09-26 18:14:36 -06:00
commit fb5a0fc542
443 changed files with 21892 additions and 0 deletions

110
Traefik/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Traefik
URL: traefik.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Traefik failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Traefik failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Traefik succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Traefik failed.
when:
status:
- failure

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
http:
middlewares:
authentik:
forwardAuth:
address: http://authentik_server:9000/outpost.goauthentik.io/auth/traefik
trustForwardHeader: true
authResponseHeaders:
- X-authentik-username
- X-authentik-groups
- X-authentik-email
- X-authentik-name
- X-authentik-uid
- X-authentik-jwt
- X-authentik-meta-jwks
- X-authentik-meta-outpost
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-version
- Authorization

View File

@@ -0,0 +1,15 @@
http:
middlewares:
ip-local:
ipWhiteList:
sourceRange:
- "192.168.1.1/16"
- "172.27.0.0/16"
tcp:
middlewares:
ip-local:
ipWhiteList:
sourceRange:
- "192.168.1.1/16"
- "172.27.0.0/16"

View File

@@ -0,0 +1,8 @@
http:
routers:
prometheus:
rule: "(Host(`traefik.alexlebens.net`) && Path(`/metrics`))"
entryPoints: websecure
service: prometheus@internal
middlewares:
- "ip-local@file"

View File

@@ -0,0 +1,116 @@
http:
middlewares:
sonarr-theme:
plugin:
theme-park:
app: sonarr
theme: nord
baseUrl: https://themepark.alexlebens.net
sonarr-nord-theme:
plugin:
theme-park:
app: sonarr
theme: nord
baseUrl: https://themepark.alexlebens.net
sonarr-hotpink-theme:
plugin:
theme-park:
app: sonarr
theme: hotpink
baseUrl: https://themepark.alexlebens.net
sonarr-aquamarine-theme:
plugin:
theme-park:
app: sonarr
theme: aquamarine
baseUrl: https://themepark.alexlebens.net
radarr-theme:
plugin:
theme-park:
app: radarr
theme: nord
baseUrl: https://themepark.alexlebens.net
radarr-nord-theme:
plugin:
theme-park:
app: radarr
theme: nord
baseUrl: https://themepark.alexlebens.net
radarr-hotpink-theme:
plugin:
theme-park:
app: radarr
theme: hotpink
baseUrl: https://themepark.alexlebens.net
radarr-aquamarine-theme:
plugin:
theme-park:
app: radarr
theme: aquamarine
baseUrl: https://themepark.alexlebens.net
radarr-space-gray-theme:
plugin:
theme-park:
app: radarr
theme: space-gray
baseUrl: https://themepark.alexlebens.net
radarr-dracula-theme:
plugin:
theme-park:
app: radarr
theme: dracula
baseUrl: https://themepark.alexlebens.net
lidarr-theme:
plugin:
theme-park:
app: lidarr
theme: nord
baseUrl: https://themepark.alexlebens.net
readarr-theme:
plugin:
theme-park:
app: readarr
theme: nord
baseUrl: https://themepark.alexlebens.net
readarr-nord-theme:
plugin:
theme-park:
app: readarr
theme: nord
baseUrl: https://themepark.alexlebens.net
readarr-space-gray-theme:
plugin:
theme-park:
app: readarr
theme: space-gray
baseUrl: https://themepark.alexlebens.net
readarr-aquamarine-theme:
plugin:
theme-park:
app: readarr
theme: aquamarine
baseUrl: https://themepark.alexlebens.net
prowlarr-theme:
plugin:
theme-park:
app: prowlarr
theme: nord
baseUrl: https://themepark.alexlebens.net
tautulli-theme:
plugin:
theme-park:
app: tautulli
theme: plex
baseUrl: https://themepark.alexlebens.net
qbittorrent-theme:
plugin:
theme-park:
app: qbittorrent
theme: nord
baseUrl: https://themepark.alexlebens.net
calibreweb-theme:
plugin:
theme-park:
app: calibreweb
theme: nord
baseUrl: https://themepark.alexlebens.net

View File

@@ -0,0 +1,124 @@
################################################################
# Global
################################################################
global:
checkNewVersion: true
sendAnonymousUsage: false
################################################################
# EntryPoints
################################################################
entryPoints:
web:
address: :80
http:
middlewares:
- ip-local@file
websecure:
address: :443
forwardedHeaders:
trustedIPs:
- "192.168.1.1/16"
- "172.27.0.0/16"
proxyProtocol:
trustedIPs:
- "192.168.1.1/16"
- "172.27.0.0/16"
http:
tls:
options: default
certResolver: le-cloudflare
domains:
- main: "*.alexlebens.net"
sans:
- "alexlebens.net"
middlewares:
- ip-local@file
################################################################
# Certificate Resolvers
################################################################
certificatesResolvers:
le-cloudflare:
acme:
email: alexanderlebens@gmail.com
storage: /etc/traefik/acme/acme.json
# caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
preferredChain: "ISRG Root X1"
dnsChallenge:
provider: cloudflare
delayBeforeCheck: "3"
resolvers:
- "1.1.1.1"
- "1.0.0.1"
################################################################
# Traefik logs
################################################################
log:
level: INFO
################################################################
# Access logs
################################################################
accessLog: {}
################################################################
# API and Dashboard
################################################################
api:
insecure: false
dashboard: true
################################################################
# Ping
################################################################
# ping:
################################################################
# Metrics
################################################################
metrics:
prometheus:
addEntryPointsLabels: true
addRoutersLabels: true
addServicesLabels: true
buckets:
- 0.1
- 0.3
- 1.2
- 5.0
entryPoint: websecure
manualRouting: true
################################################################
# Providers
################################################################
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
directory: "/etc/traefik/conf"
watch: true
################################################################
# Experimental
################################################################
experimental:
plugins:
theme-park:
moduleName: "github.com/packruler/traefik-themepark"
version: "v1.2.2"

3
Traefik/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Traefik
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Traefik/status.svg)](https://drone.alexlebens.net/alexlebens/Traefik)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Traefik - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://traefik.alexlebens.net/dashboard/#/",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "traefik",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Traefik - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://traefik.alexlebens.net/dashboard/#/",
"accepted_statuscodes": [
"200-299"
]
}

View File

@@ -0,0 +1,55 @@
services:
traefik:
command: traefik
container_name: traefik
environment:
CF_API_EMAIL: alexanderlebens@gmail.com
CF_API_KEY: f83de272d8c6f76a6d9074160780c924c0878
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
image: docker.io/traefik:2.9.6
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.dashboard.entrypoints: websecure
traefik.http.routers.dashboard.rule: (Host(`traefik.alexlebens.net`) && (PathPrefix(`/api/`) || PathPrefix(`/dashboard/`)))
traefik.http.routers.dashboard.service: api@internal
traefik.http.routers.dashboard.tls: true
traefik.http.routers.dashboard.tls.certresolver: le-cloudflare
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
ports:
- 192.168.1.15:80:80
- 192.168.1.15:443:443
- 192.168.1.15:9000:9000
privileged: true
restart: always
user: root
volumes:
- config:/etc/traefik
- log:/log
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
traefik:
name: traefik
external: true
volumes:
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/traefik_config
log:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/traefik_log