Added qbittorrentvpn

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2023-04-17 21:43:51 +02:00
parent c48abb4512
commit b6b20ae79c
6 changed files with 78 additions and 6 deletions

View File

@@ -52,6 +52,10 @@
tags:
- bin
- include_tasks: qbit.yml
tags:
- qbit
- name: Copy the compose file
template:
src: templates/aya01/compose.yaml

View File

@@ -0,0 +1,21 @@
---
- name: Create qbit-config directory
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '775'
state: directory
loop:
- "{{ qbit_config }}"
- "{{ qbit_downloads }}"
become: true
- name: Copy ovpn-config
template:
owner: "{{ puid }}"
group: "{{ pgid }}"
src: "{{ qbit_config }}/{{ qbit_ovpn_config }}"
dest: "{{ qbit_remote_config }}/{{ qbit_ovpn_config }}"
mode: '664'
become: true

View File

@@ -181,7 +181,6 @@ services:
image: lscr.io/linuxserver/plex:latest
container_name: plex
restart: always
ip: {{ plex_ip }}
networks:
- net
ports:
@@ -311,16 +310,44 @@ services:
- "traefik.http.routers.{{ bin_host }}.rule=Host(`{{ bin_host }}.{{ aya01_host }}.{{ local_domain }}`)"
- "traefik.http.services.{{ bin_host }}.loadbalancer.server.port={{ bin_port }}"
qbittorrentvpn:
image: dyonr/qbittorrentvpn
container_name: {{ qbit_host }}
restart: always
privileged: true
networks:
- net
ports:
- "{{ qbit_port }}:8080"
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
- VPN_TYPE={{ qbit_type }}
- LAN_NETWORK={{ qbit_lan }}
- NAME_SERVERS={{ qbit_dns }}
- ENABLE_SSL={{ qbit_ssl }}
- VPN_USERNAME={{ vault_qbit_vpn_user }}
- VPN_PASSWORD={{ vault_qbit_vpn_password }}
volumes:
- {{ qbit_remote_config }}:/config
- {{ qbit_downloads }}:/downloads
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{ qbit_host }}.rule=Host(`{{ qbit_host }}.{{ aya01_host }}.{{ local_domain }}`)"
- "traefik.http.services.{{ qbit_host }}.loadbalancer.server.port=8080"
networks:
zoneminder:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.42.0/24
- subnet: {{ zoneminder_network }}
net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.69.0/24
- subnet: {{ docker_network }}

View File

@@ -12,7 +12,7 @@ server {
location / {
include /config/nginx/resolver.conf;
proxy_pass http://{{ plex_ip | replace('.','-') }}.{{ vault_plex_server_id }}.plex.direct:{{ plex_port }}/
proxy_pass http://172-16-69-11.{{ vault_plex_server_id }}.plex.direct:{{ plex_port }}/
proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier;
proxy_set_header X-Plex-Device $http_x_plex_device;