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
  • Loading branch information
LegitCamper committed Mar 16, 2024
1 parent a856068 commit a2b8bf7
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 27 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
89 changes: 80 additions & 9 deletions media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ networks:
external: true
internal:
external: false
openvpn:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.55.0/24
gateway: 192.168.55.1

services:
jellyfin:
Expand Down Expand Up @@ -44,31 +51,95 @@ services:

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
networks:
openvpn:
ipv4_address: 192.168.55.10
cap_add:
- NET_ADMIN
expose:
- 9091
ports:
- 9091:9091
# The bitmagnet ports must be exposed by the openvpn container:
# API and WebUI port:
- "3333:3333"
# BitTorrent ports:
- "3334:3334/tcp"
- "3334:3334/udp"
extra_hosts:
- "postgres:192.168.55.11"
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.docker.network=openvpn"
- "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.middlewares=forward-auth"

- "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.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.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:
- POSTGRES_HOST=postgres
command:
- worker
- run
- --keys=http_server
- --keys=queue_server
- --keys=dht_crawler
depends_on:
postgres:
condition: service_healthy

postgres:
image: postgres:16-alpine
container_name: bitmagnet-postgres
networks:
openvpn:
ipv4_address: 192.168.55.11
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 a2b8bf7

Please sign in to comment.