Skip to content

Commit

Permalink
adding bitmagnet
Browse files Browse the repository at this point in the history
clean dashy

fix bitmagnet and transmission

fix

rev

fixes with networks and transmission
  • Loading branch information
LegitCamper committed Mar 16, 2024
1 parent a856068 commit c4b0e10
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 57 deletions.
22 changes: 4 additions & 18 deletions dashy/conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ sections:
icon: hl-jellyfin
url: https://jellyfin.sawyer.services
target: newtab
id: 0_480_jellyfin
- title: Transmission
icon: hl-transmission
url: https://transmission.sawyer.services
target: newtab
id: 1_480_transmission
- title: Bitmagnet
icon: https://avatars.githubusercontent.com/u/146768397
url: bitmagnet.sawyer.services
target: newtab
displayData:
sortBy: default
rows: 1
Expand All @@ -26,27 +28,22 @@ sections:
icon: hl-portainer
url: https://portainer.sawyer.services
target: newtab
id: 0_956_portainer
- title: Docker Registry
icon: hl-docker
url: https://registry.sawyer.services
target: clipboard
id: 1_956_dockerregistry
- title: Searxng
icon: hl-searxng
url: https://search.sawyer.services
target: newtab
id: 2_956_searxng
- title: File Browser
icon: hl-filebrowser
url: https://files.sawyer.services
target: newtab
id: 3_956_filebrowser
- title: Smoke Ping
icon: hl-smokeping
url: https://ping.sawyer.services
target: newtab
id: 4_956_smokeping
icon: fa fa-wrench
displayData:
sortBy: default
Expand All @@ -67,17 +64,14 @@ sections:
icon: hl-adguardhome
url: https://adguard.sawyer.services
target: newtab
id: 0_746_adguardhome
- title: DNS
icon: fa fa-server
url: tls://dns.sawyer.services:853
target: clipboard
id: 1_746_dns
- title: Traefik
icon: hl-traefik
url: https://traefik.sawyer.services
target: newtab
id: 2_746_traefik
- name: Tools
icon: fa fa-server
displayData:
Expand All @@ -91,27 +85,22 @@ sections:
icon: hl-digital-ocean
url: https://cloud.digitalocean.com/projects
target: newtab
id: 0_529_digitalocean
- title: Tailscale
icon: hl-tailscale
url: https://login.tailscale.com/admin/machines
target: newtab
id: 1_529_tailscale
- title: Homelab Github
icon: hl-github
url: https://github.com/LegitCamper/homelab
target: newtab
id: 2_529_homelabgithub
- title: Gateway Github
icon: hl-github
url: https://github.com/LegitCamper/homelab-gateway
target: newtab
id: 3_529_gatewaygithub
- title: Cloudfare
icon: hl-cloudflare
url: https://dash.cloudflare.com
target: newtab
id: 4_529_cloudfare
- name: AI
displayData:
sortBy: default
Expand All @@ -123,12 +112,10 @@ sections:
- title: Fooocus
url: https://fooocus.sawyer.services
target: newtab
id: 0_138_fooocus
- title: Ollama
icon: https://ollama.com/public/ollama.png
url: https://ollama.sawyer.services
target: newtab
id: 1_138_ollama
- name: Gaming
displayData:
sortBy: default
Expand All @@ -141,7 +128,6 @@ sections:
icon: hl-minecraft
url: mc.sawyer.services
target: clipboard
id: 0_595_minecraft
appConfig:
language: en
layout: auto
Expand Down
145 changes: 106 additions & 39 deletions media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,134 @@ networks:
external: false

services:
jellyfin:
image: lscr.io/linuxserver/jellyfin
container_name: jellyfin
restart: always
networks:
- web
ports:
- 8096:8096/tcp
- 8920:8920
volumes:
- ${DRIVE}/shows/:/data/tvshows/
- ${DRIVE}/movies/:/data/movies/
- ${DRIVE}/certbot/certificates/:/data/certs/
- ${DRIVE}/jellyfin-conf/:/config/:rw
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.jellyfin.entrypoints=http"
- "traefik.http.routers.jellyfin.rule=Host(`jellyfin.${DOMAIN}`)"
- "traefik.http.middlewares.jellyfin-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.jellyfin.middlewares=jellyfin-https-redirect"
- "traefik.http.routers.jellyfin-secure.entrypoints=https"
- "traefik.http.routers.jellyfin-secure.rule=Host(`jellyfin.${DOMAIN}`)"
- "traefik.http.routers.jellyfin-secure.tls=true"
- "traefik.http.routers.jellyfin-secure.tls.certresolver=${DNS}"
- "traefik.http.services.jellyfin-secure.loadbalancer.server.port=8096"
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
# jellyfin:
# image: lscr.io/linuxserver/jellyfin
# container_name: jellyfin
# restart: always
# networks:
# - web
# ports:
# - 8096:8096/tcp
# - 8920:8920
# volumes:
# - ${DRIVE}/shows/:/data/tvshows/
# - ${DRIVE}/movies/:/data/movies/
# - ${DRIVE}/certbot/certificates/:/data/certs/
# - ${DRIVE}/jellyfin-conf/:/config/:rw
# labels:
# - "traefik.enable=true"
# - "traefik.docker.network=web"
# - "traefik.http.routers.jellyfin.entrypoints=http"
# - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.${DOMAIN}`)"
# - "traefik.http.middlewares.jellyfin-https-redirect.redirectscheme.scheme=https"
# - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
# - "traefik.http.routers.jellyfin.middlewares=jellyfin-https-redirect"
# - "traefik.http.routers.jellyfin-secure.entrypoints=https"
# - "traefik.http.routers.jellyfin-secure.rule=Host(`jellyfin.${DOMAIN}`)"
# - "traefik.http.routers.jellyfin-secure.tls=true"
# - "traefik.http.routers.jellyfin-secure.tls.certresolver=${DNS}"
# - "traefik.http.services.jellyfin-secure.loadbalancer.server.port=8096"
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# capabilities: [gpu]

transmission-openvpn:
image: haugene/transmission-openvpn
container_name: transmission
container_name: transmission-openvpn
restart: always
networks:
- web
cap_add:
- NET_ADMIN
volumes:
- ${DRIVE}/:/data
env_file:
- ./secrets/homelab.env
environment:
- OPENVPN_OPTS=--pull-filter ignore ifconfig-ipv6
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- NET_ADMIN
expose:
# any ports needed to expose services through traefik need to be defined here
- 9091 # transmission
- 3333 # bitmagnet
ports:
- 9091:9091
# BitTorrent ports:
- "3334:3334/tcp"
- "3334:3334/udp"
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
# transmission
- "traefik.http.routers.transmission.entrypoints=http"
- "traefik.http.routers.transmission.rule=Host(`transmission.${DOMAIN}`) || Host(`torrent.${DOMAIN}`) "
- "traefik.http.routers.transmission.rule=Host(`transmission.${DOMAIN}`) || Host(`torrent.${DOMAIN}`)"
- "traefik.http.middlewares.transmission-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.transmission.middlewares=transmission-https-redirect"
- "traefik.http.routers.transmission-secure.entrypoints=https"
- "traefik.http.routers.transmission-secure.rule=Host(`transmission.${DOMAIN}`) || Host(`torrent.${DOMAIN}`) "
- "traefik.http.routers.transmission-secure.rule=Host(`transmission.${DOMAIN}`) || Host(`torrent.${DOMAIN}`)"
- "traefik.http.routers.transmission-secure.tls=true"
- "traefik.http.routers.transmission-secure.tls.certresolver=${DNS}"
- "traefik.http.services.transmission-secure.loadbalancer.server.port=9091"
- "traefik.http.routers.transmission-secure.service=transmission"
- "traefik.http.routers.transmission-secure.middlewares=forward-auth"
# bitmagnet
- "traefik.http.routers.bitmagnet.entrypoints=http"
- "traefik.http.routers.bitmagnet.rule=Host(`bitmagnet.${DOMAIN}`)"
- "traefik.http.middlewares.bitmagnet-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.bitmagnet.middlewares=bitmagnet-https-redirect"
- "traefik.http.routers.bitmagnet-secure.entrypoints=https"
- "traefik.http.routers.bitmagnet-secure.rule=Host(`bitmagnet.${DOMAIN}`)"
- "traefik.http.routers.bitmagnet-secure.tls=true"
- "traefik.http.routers.bitmagnet-secure.tls.certresolver=${DNS}"
- "traefik.http.services.bitmagnet-secure.loadbalancer.server.port=3333"
- "traefik.http.routers.bitmagnet-secure.service=bitmagnet"
- "traefik.http.routers.bitmagnet-secure.middlewares=forward-auth"

bitmagnet:
image: ghcr.io/bitmagnet-io/bitmagnet:latest
restart: always
container_name: bitmagnet
network_mode: "service:transmission-openvpn"
# webui on port 3333
env_file:
- ./secrets/homelab.env
environment:
# uses this name because ports are exposed through transmission
- POSTGRES_HOST=localhost
command:
- worker
- run
- --keys=http_server
- --keys=queue_server
- --keys=dht_crawler
labels:
- "traefik.enable=false"
depends_on:
postgres:
condition: service_healthy

postgres:
image: postgres:16-alpine
container_name: bitmagnet-postgres
network_mode: "service:transmission-openvpn"
volumes:
- ./data/postgres:/var/lib/postgresql/data
restart: always
env_file:
- ./secrets/homelab.env
environment:
- POSTGRES_DB=bitmagnet
shm_size: 1g
healthcheck:
test:
- CMD-SHELL
- pg_isready
start_period: 20s
interval: 10s
labels:
- "traefik.enable=false"

0 comments on commit c4b0e10

Please sign in to comment.