Skip to content

Commit

Permalink
adding bitmagnet
Browse files Browse the repository at this point in the history
  • Loading branch information
LegitCamper committed Mar 16, 2024
1 parent a856068 commit 68fdead
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 31 deletions.
91 changes: 70 additions & 21 deletions dashy/conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,62 @@ sections:
- name: Media
icon: fa fa-film
items:
- title: Jellyfin
- &ref_0
title: Jellyfin
icon: hl-jellyfin
url: https://jellyfin.sawyer.services
target: newtab
id: 0_480_jellyfin
- title: Transmission
- &ref_1
title: Transmission
icon: hl-transmission
url: https://transmission.sawyer.services
target: newtab
id: 1_480_transmission
- &ref_2
title: bitmagnet
icon: https://avatars.githubusercontent.com/u/146768397
url: bitmagnet.sawyer.services
target: newtab
id: 2_480_bitmagnet
displayData:
sortBy: default
rows: 1
cols: 1
collapsed: false
hideForGuests: false
filteredItems:
- *ref_0
- *ref_1
- *ref_2
- name: Utilities
items:
- title: portainer
- &ref_3
title: portainer
icon: hl-portainer
url: https://portainer.sawyer.services
target: newtab
id: 0_956_portainer
- title: Docker Registry
- &ref_4
title: Docker Registry
icon: hl-docker
url: https://registry.sawyer.services
target: clipboard
id: 1_956_dockerregistry
- title: Searxng
- &ref_5
title: Searxng
icon: hl-searxng
url: https://search.sawyer.services
target: newtab
id: 2_956_searxng
- title: File Browser
- &ref_6
title: File Browser
icon: hl-filebrowser
url: https://files.sawyer.services
target: newtab
id: 3_956_filebrowser
- title: Smoke Ping
- &ref_7
title: Smoke Ping
icon: hl-smokeping
url: https://ping.sawyer.services
target: newtab
Expand All @@ -54,6 +71,12 @@ sections:
cols: 1
collapsed: false
hideForGuests: false
filteredItems:
- *ref_3
- *ref_4
- *ref_5
- *ref_6
- *ref_7
- name: Network
icon: fa fa-ethernet
displayData:
Expand All @@ -63,21 +86,28 @@ sections:
collapsed: false
hideForGuests: false
items:
- title: AdGuard Home
- &ref_8
title: AdGuard Home
icon: hl-adguardhome
url: https://adguard.sawyer.services
target: newtab
id: 0_746_adguardhome
- title: DNS
- &ref_9
title: DNS
icon: fa fa-server
url: tls://dns.sawyer.services:853
target: clipboard
id: 1_746_dns
- title: Traefik
- &ref_10
title: Traefik
icon: hl-traefik
url: https://traefik.sawyer.services
target: newtab
id: 2_746_traefik
filteredItems:
- *ref_8
- *ref_9
- *ref_10
- name: Tools
icon: fa fa-server
displayData:
Expand All @@ -87,31 +117,42 @@ sections:
collapsed: false
hideForGuests: false
items:
- title: Digital Ocean
- &ref_11
title: Digital Ocean
icon: hl-digital-ocean
url: https://cloud.digitalocean.com/projects
target: newtab
id: 0_529_digitalocean
- title: Tailscale
- &ref_12
title: Tailscale
icon: hl-tailscale
url: https://login.tailscale.com/admin/machines
target: newtab
id: 1_529_tailscale
- title: Homelab Github
- &ref_13
title: Homelab Github
icon: hl-github
url: https://github.com/LegitCamper/homelab
target: newtab
id: 2_529_homelabgithub
- title: Gateway Github
- &ref_14
title: Gateway Github
icon: hl-github
url: https://github.com/LegitCamper/homelab-gateway
target: newtab
id: 3_529_gatewaygithub
- title: Cloudfare
- &ref_15
title: Cloudfare
icon: hl-cloudflare
url: https://dash.cloudflare.com
target: newtab
id: 4_529_cloudfare
filteredItems:
- *ref_11
- *ref_12
- *ref_13
- *ref_14
- *ref_15
- name: AI
displayData:
sortBy: default
Expand All @@ -120,15 +161,20 @@ sections:
collapsed: false
hideForGuests: false
items:
- title: Fooocus
- &ref_16
title: Fooocus
url: https://fooocus.sawyer.services
target: newtab
id: 0_138_fooocus
- title: Ollama
- &ref_17
title: Ollama
icon: https://ollama.com/public/ollama.png
url: https://ollama.sawyer.services
target: newtab
id: 1_138_ollama
filteredItems:
- *ref_16
- *ref_17
- name: Gaming
displayData:
sortBy: default
Expand All @@ -137,17 +183,20 @@ sections:
collapsed: false
hideForGuests: false
items:
- title: Minecraft
- &ref_18
title: Minecraft
icon: hl-minecraft
url: mc.sawyer.services
target: clipboard
id: 0_595_minecraft
filteredItems:
- *ref_18
appConfig:
language: en
layout: auto
iconSize: medium
customColors:
default:
primary: "#b7bdf8"
background: "#0b1021"
background-darker: "#05070e"
primary: '#b7bdf8'
background: '#0b1021'
background-darker: '#05070e'
93 changes: 83 additions & 10 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,97 @@ 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"

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
labels:
- "traefik.enable=true"
- "traefik.docker.network=openvpn"
- "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.middlewares=forward-auth"
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 68fdead

Please sign in to comment.