summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-11-14 15:31:25 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-11-14 15:31:25 -0500
commit82995764a79e115e495e71b1ea6a961ae7cceaba (patch)
treeb1dc602f4cc938a9f98ad4eb80d563d3309c62a2
Batman
-rw-r--r--.gitignore1
-rw-r--r--assets/misc-bot.jpgbin0 -> 135458 bytes
-rw-r--r--assets/overseerr.jpgbin0 -> 104427 bytes
-rw-r--r--assets/prowlarr.jpgbin0 -> 5942652 bytes
-rw-r--r--assets/radarr.jpgbin0 -> 4637897 bytes
-rw-r--r--assets/sonarr.jpgbin0 -> 397090 bytes
-rw-r--r--configs/doplarr/.gitignore2
-rw-r--r--configs/gluetun/.gitignore2
-rw-r--r--configs/jellyfin/.gitignore2
-rw-r--r--configs/overseerr/.gitignore2
-rw-r--r--configs/prowlarr/.gitignore2
-rw-r--r--configs/qbittorrent/.gitignore2
-rw-r--r--configs/radarr/.gitignore2
-rw-r--r--configs/sonarr/.gitignore2
-rw-r--r--configs/traefik/certs/.gitignore2
-rw-r--r--configs/traefik/static-cfg.yaml14
-rw-r--r--configs/traefik/traefik.yaml39
-rw-r--r--docker-compose.yml213
-rw-r--r--qbit-pia/Dockerfile4
-rwxr-xr-xqbit-pia/run12
-rw-r--r--template.env22
21 files changed, 323 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4c49bd7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.env
diff --git a/assets/misc-bot.jpg b/assets/misc-bot.jpg
new file mode 100644
index 0000000..46db8e7
--- /dev/null
+++ b/assets/misc-bot.jpg
Binary files differ
diff --git a/assets/overseerr.jpg b/assets/overseerr.jpg
new file mode 100644
index 0000000..d9db678
--- /dev/null
+++ b/assets/overseerr.jpg
Binary files differ
diff --git a/assets/prowlarr.jpg b/assets/prowlarr.jpg
new file mode 100644
index 0000000..f4f89eb
--- /dev/null
+++ b/assets/prowlarr.jpg
Binary files differ
diff --git a/assets/radarr.jpg b/assets/radarr.jpg
new file mode 100644
index 0000000..594d395
--- /dev/null
+++ b/assets/radarr.jpg
Binary files differ
diff --git a/assets/sonarr.jpg b/assets/sonarr.jpg
new file mode 100644
index 0000000..62c7e82
--- /dev/null
+++ b/assets/sonarr.jpg
Binary files differ
diff --git a/configs/doplarr/.gitignore b/configs/doplarr/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/doplarr/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/gluetun/.gitignore b/configs/gluetun/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/gluetun/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/jellyfin/.gitignore b/configs/jellyfin/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/jellyfin/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/overseerr/.gitignore b/configs/overseerr/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/overseerr/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/prowlarr/.gitignore b/configs/prowlarr/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/prowlarr/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/qbittorrent/.gitignore b/configs/qbittorrent/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/qbittorrent/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/radarr/.gitignore b/configs/radarr/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/radarr/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/sonarr/.gitignore b/configs/sonarr/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/sonarr/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/traefik/certs/.gitignore b/configs/traefik/certs/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/configs/traefik/certs/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/configs/traefik/static-cfg.yaml b/configs/traefik/static-cfg.yaml
new file mode 100644
index 0000000..91ecb03
--- /dev/null
+++ b/configs/traefik/static-cfg.yaml
@@ -0,0 +1,14 @@
+http:
+ routers:
+ plex:
+ rule: Host(`plex.{{ env "DOMAIN" }}`)
+ service: plex
+ tls:
+ certResolver: cloudflare
+ entryPoints:
+ - websecure
+ services:
+ plex:
+ loadBalancer:
+ servers:
+ - url: 'http://host.docker.internal:32400'
diff --git a/configs/traefik/traefik.yaml b/configs/traefik/traefik.yaml
new file mode 100644
index 0000000..25af4dc
--- /dev/null
+++ b/configs/traefik/traefik.yaml
@@ -0,0 +1,39 @@
+global:
+ checkNewVersion: false
+ sendAnonymousUsage: false
+
+log:
+ level: DEBUG
+
+api:
+ dashboard: true
+ insecure: true
+
+entryPoints:
+ web:
+ address: :80
+ websecure:
+ address: :443
+ asDefault: true
+
+certificatesResolvers:
+ cloudflare:
+ acme:
+ email: benjamin@chausse.xyz
+ storage: /var/traefik/certs/cloudflare-acme.json
+ caServer: 'https://acme-v02.api.letsencrypt.org/directory'
+ keyType: EC256
+ dnsChallenge:
+ provider: cloudflare
+ resolvers:
+ - "1.1.1.1:53"
+ - "8.8.8.8:53"
+
+providers:
+ file:
+ filename: /etc/traefik/static-cfg.yaml
+
+ docker:
+ endpoint: "unix:///var/run/docker.sock"
+ allowEmptyServices: true
+ exposedByDefault: false
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..ce1f3e3
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,213 @@
+---
+services:
+ traefik:
+ image: traefik:v3.1
+ container_name: traefik
+ networks:
+ - highseas
+ ports:
+ - 80:80 # http
+ - 443:443 # https
+ - 8080:8080 # dashboard (LAN only, do not expose)
+ environment:
+ - CF_DNS_API_TOKEN=${CLOUDFLARE_TOKEN}
+ - DOMAIN=${DOMAIN}
+ - EMAIL=${EMAIL}
+ extra_hosts:
+ - "host.docker.internal:host-gateway"
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - ./configs/traefik/traefik.yaml:/etc/traefik/traefik.yaml
+ - ./configs/traefik/static-cfg.yaml:/etc/traefik/static-cfg.yaml
+ - ./configs/traefik/certs:/var/traefik/certs:rw
+ restart: unless-stopped
+
+ resolver:
+ image: linuxserver/prowlarr:latest
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=${TIMEZONE}
+ volumes:
+ - ./configs/prowlarr:/config
+ - ${TORRENT_TMP_DIR}:/downloads
+ networks:
+ - highseas
+ ports:
+ - 9696:9696
+ labels:
+ - traefik.enable=true
+ - traefik.http.routers.resolve.rule=Host(`resolve.${DOMAIN}`)
+ - traefik.http.routers.resolve.tls.certresolver=cloudflare
+ restart: unless-stopped
+
+ tv:
+ image: linuxserver/sonarr:latest
+ environment:
+ - PUID=1000
+ - PGID=1000
+ volumes:
+ - ./configs/sonarr:/config
+ - ${TV_DIR}:/tv
+ - ${TORRENT_TMP_DIR}:/downloads
+ networks:
+ - highseas
+ ports:
+ - 8989:8989
+ labels:
+ - traefik.enable=true
+ - traefik.http.routers.tv.rule=Host(`tv.${DOMAIN}`)
+ - traefik.http.routers.tv.tls.certresolver=cloudflare
+ restart: unless-stopped
+
+
+ movies:
+ image: linuxserver/radarr:latest
+ environment:
+ - PUID=1000
+ - PGID=1000
+ volumes:
+ - ./configs/radarr:/config
+ - ${MOVIE_DIR}:/movies
+ - ${TORRENT_TMP_DIR}:/downloads
+ networks:
+ - highseas
+ ports:
+ - 7878:7878
+ labels:
+ - traefik.enable=true
+ - traefik.http.routers.movies.rule=Host(`movies.${DOMAIN}`)
+ - traefik.http.routers.movies.tls.certresolver=cloudflare
+ restart: unless-stopped
+
+
+ oversee:
+ image: linuxserver/overseerr:latest
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=${TIMEZONE}
+ volumes:
+ - ./configs/overseerr:/config
+ networks:
+ - highseas
+ ports:
+ - 5055:5055
+ - 5055:5055/tcp
+ labels:
+ - traefik.enable=true
+ - traefik.http.routers.overseer.rule=Host(`manage.${DOMAIN}`)
+ - traefik.http.routers.overseer.tls.certresolver=cloudflare
+ restart: unless-stopped
+
+
+ jellyfin:
+ image: lscr.io/linuxserver/jellyfin:latest
+ container_name: jellyfin
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=${TIMEZONE}
+ - JELLYFIN_PublishedServerUrl=https://watch.alcovian.com
+ volumes:
+ - ./configs/jellyfin:/config
+ - ${TV_DIR}:/tvshows
+ - ${MOVIE_DIR}:/movies
+ - ${MISC_DIR}:/misc
+ networks:
+ - highseas
+ ports:
+ - 8096:8096
+ # - 8920:8920 #optional
+ # - 7359:7359/udp #optional
+ # - 1900:1900/udp #optional
+ labels:
+ - traefik.enable=true
+ - traefik.http.routers.jelly.rule=Host(`watch.${DOMAIN}`)
+ - traefik.http.routers.jelly.tls.certresolver=cloudflare
+ restart: unless-stopped
+
+ torrent:
+ build:
+ context: ./qbit-pia
+ # context: ./qbit-pia
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=${TIMEZONE}
+ - WEBUI_PORT=4242
+ - TORRENTING_PORT=6881
+ volumes:
+ - ./configs/qbittorrent:/config
+ - ${TORRENT_TMP_DIR}:/downloads
+ - ./configs/gluetun/piaportforward.json:/etc/piaportforward.json # Sync Torrent port config from PIA
+ network_mode: service:vpn
+ depends_on:
+ - vpn # Otherwise piaconf can be empty/out-of-date
+ restart: unless-stopped
+
+ bot:
+ image: linuxserver/doplarr:latest
+ networks:
+ - highseas
+ restart: unless-stopped
+ volumes:
+ - ./configs/doplarr:/config
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=${TIMEZONE}
+ - OVERSEERR__URL=https://oversee.alcovian.com
+ # - OVERSEERR__URL=http://localhost:5055
+ - DISCORD__TOKEN=${DISCORD_TOKEN}
+ - OVERSEERR__API=${OVERSEERR_TOKEN}
+ - PARTIAL_SEASONS=true
+
+ vpn:
+ image: qmcgaw/gluetun:latest
+ cap_add:
+ - NET_ADMIN
+ volumes:
+ - ./configs/gluetun:/gluetun
+ networks:
+ - highseas
+ ports:
+ # Prowlarr ports:
+ # - 9696:9696
+ # Sonarr ports:
+ # - 8989:8989
+ # Radarr ports:
+ # - 7878:7878
+ # Flaresolverr ports:
+ # - "${PORT:-8191}:8191"
+ # Overseerr ports:
+ # - 5055:5055/tcp
+ # Qbittorrent
+ - 4242:4242 # Traefik exposes the smallest port
+ - 6881:6881
+ - 6881:6881/udp
+ environment:
+ - VPN_SERVICE_PROVIDER=private internet access
+ - OPENVPN_USER=${VPN_USER}
+ - OPENVPN_PASSWORD=${VPN_PASSWD}
+ - VPN_PORT_FORWARDING=on
+ - REGION=${VPN_REGION}
+ labels:
+ - traefik.enable=true
+ - traefik.http.routers.torrent.rule=Host(`torrent.${DOMAIN}`)
+ - traefik.http.routers.torrent.tls.certresolver=cloudflare
+ restart: unless-stopped
+
+ proxy:
+ image: ghcr.io/flaresolverr/flaresolverr:latest
+ environment:
+ - LOG_LEVEL=info
+ networks:
+ - highseas
+ ports:
+ - 8191:8191
+ restart: unless-stopped
+
+networks:
+ highseas:
+ driver: bridge
diff --git a/qbit-pia/Dockerfile b/qbit-pia/Dockerfile
new file mode 100644
index 0000000..bbc309b
--- /dev/null
+++ b/qbit-pia/Dockerfile
@@ -0,0 +1,4 @@
+FROM linuxserver/qbittorrent:latest AS qbit-pia
+
+COPY run /etc/s6-overlay/s6-rc.d/svc-qbittorrent/run
+RUN chmod 755 /etc/s6-overlay/s6-rc.d/svc-qbittorrent/run
diff --git a/qbit-pia/run b/qbit-pia/run
new file mode 100755
index 0000000..7a6e5e9
--- /dev/null
+++ b/qbit-pia/run
@@ -0,0 +1,12 @@
+#!/usr/bin/with-contenv bash
+# shellcheck shell=bash
+
+WEBUI_PORT=${WEBUI_PORT:-8080}
+TORRENTING_PORT=$(jq -r '.port' /etc/piaportforward.json)
+if [[ -n "${TORRENTING_PORT}" ]]; then
+ TORRENTING_PORT_ARG="--torrenting-port=${TORRENTING_PORT}"
+fi
+
+exec \
+ s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${WEBUI_PORT}" \
+ s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" ${TORRENTING_PORT_ARG}
diff --git a/template.env b/template.env
new file mode 100644
index 0000000..c48995a
--- /dev/null
+++ b/template.env
@@ -0,0 +1,22 @@
+# Traefik Info (you will need to set your email in ./configs/traefik/traefik.yaml)
+DOMAIN=
+CLOUDFLARE_TOKEN=
+# Where you want your TV Shows on your computer
+TV_DIR=
+# Where you want your Movies on your computer
+MOVIE_DIR=
+# Where you want your personal videos (your cat, kid, concert, etc...)
+MISC_DIR=
+# Where should your Torrents be downloaded (before getting moved)
+TORRENT_TMP_DIR=
+WATCH_DIR=
+# Your Timezone
+TIMEZONE=
+# Your VPN Service Info
+VPN_USER=
+VPN_PASSWD=
+PIA_CONF_MOUNT=
+VPN_REGION=
+# Various info for Doplarr
+DISCORD_TOKEN=
+OVERSEERR_TOKEN=