Set up port forwarding with gluetun and qBittorrent

This commit is contained in:
Mike Wilson
2023-02-16 16:57:29 -05:00
parent f9db83aa6a
commit b4422d381d
6 changed files with 21 additions and 14 deletions

View File

@@ -6,6 +6,7 @@
roles:
- pve-docker
- docker-compose
- gluetun
- traefik
- prowlarr
- sonarr

View File

@@ -23,7 +23,3 @@
name: docker-compose
state: present
become: true
- name: Create Traefik docker network
community.docker.docker_network:
name: traefik

View File

@@ -21,8 +21,9 @@ services:
VPN_TYPE: wireguard
VPN_SERVICE_PROVIDER: mullvad
WIREGUARD_PRIVATE_KEY: "{{ wireguard_private_key }}"
WIREGUARD_ADDRESSES: 10.65.71.171/32
SERVER_CITIES: Ashburn VA
WIREGUARD_ADDRESSES: "10.65.208.63/32"
FIREWALL_VPN_INPUT_PORTS: 61383
SERVER_CITIES: "Chicago IL"
DOT: "off"
DNS_ADRESS: 10.64.0.1
TZ: "{{ timezone }}"

View File

@@ -1,8 +1,8 @@
wireguard_private_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
62616131323464616463333937343464626530313632376239316433666139383333653561363761
3738643265356437636233326364373832353263653961380a646362353962383939626430383831
37333138616635643961303164356137653461333964386163306237323031656164656430373138
3964636266646266390a336133633931336662663831643134303935363730616365373139613631
64306332313632303935633661313137663366353130656437343336383136623335613961373033
3031646661323438333261353634623863616330306365663133
65383135373732636133653063333264383865326430333138616332623265323439626461343334
6234313462303563623861386234626237633436306233330a633334366166323166666661623039
63323935383961663266393038636333633134643263633939653537663232643137653566343630
6664613634356336320a626561313062393862353535653864306233353033613065323963613664
66646333313761633230366466663636376566616338663866623463643339356466616166616635
3164626266653965343230613764303564653061313262656334

View File

@@ -9,12 +9,12 @@ services:
container_name: "{{ role_name }}"
image: lscr.io/linuxserver/qbittorrent:libtorrentv1
restart: unless-stopped
networks:
- traefik
network_mode: "container:gluetun"
environment:
- "PUID={{ service_user.uid }}"
- "PGID={{ media_gid }}"
- "TZ={{ timezone }}"
- DOCKER_MODS=arafatamim/linuxserver-io-mod-vuetorrent
volumes:
- "{{ data_dir }}/{{ role_name }}:/config"
- "{{ media_storage_mnt }}/data/torrents:/downloads"
@@ -22,3 +22,4 @@ services:
traefik.enable: true
traefik.http.routers.{{ role_name }}.rule: "Host(`{{ role_name }}.local.{{ personal_domain }}`)"
traefik.http.routers.{{ role_name }}.middlewares: lan-whitelist@file
traefik.http.services.qbittorrent.loadbalancer.server.port: 8080

View File

@@ -19,6 +19,14 @@
validate: docker-compose -f %s config
become: true
- name: Create config directory
file:
path: "{{ data_dir }}/traefik"
state: directory
owner: "{{ docker_user }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Install config
template:
src: traefik.yml