-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml.example
More file actions
72 lines (68 loc) · 2.81 KB
/
Copy pathdocker-compose.yml.example
File metadata and controls
72 lines (68 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: downloads
networks:
vpn-net:
name: vpn-net
services:
gluetun:
image: qmcgaw/gluetun:latest
container_name: gluetun # value of GLUETUN_CONTAINER_NAME
restart: unless-stopped
networks:
- vpn-net
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
- "${QBT_WEBUI_PORT:-8080}:${QBT_WEBUI_PORT:-8080}" # qBittorrent Web UI
- "${QBT_TORRENTING_PORT:-6881}:${QBT_TORRENTING_PORT:-6881}" # qBittorrent TCP
- "${QBT_TORRENTING_PORT:-6881}:${QBT_TORRENTING_PORT:-6881}/udp" # qBittorrent UDP
volumes:
- <path_to_gluetun_config_on_host>:/gluetun
environment:
- HTTP_CONTROL_SERVER_AUTH_DEFAULT_ROLE={"auth":"apikey","apikey":"${GLUETUN_API_KEY}"}
# THE REST OF ENV VARS SHOULD REFLECT YOUR OWN VPN CONFIG, IT'S BETTER TO REFER TO OTHER SOURCES, THIS FILE IS JUST AN EXAMPLE
# Torrent Client (routes through Gluetun)
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent # value of QBT_CONTAINER_NAME
restart: unless-stopped
network_mode: "service:gluetun"
depends_on:
- gluetun
environment:
# THE ENV VARS SHOULD REFLECT YOUR OWN QBITTORRENT CONFIG, IT'S BETTER TO REFER TO OTHER SOURCES, THIS FILE IS JUST AN EXAMPLE
WEBUI_PORT: "${QBT_WEBUI_PORT:-8080}"
TORRENTING_PORT: "${QBT_TORRENTING_PORT:-6881}"
volumes:
- <path_to_qbittorrent_config_on_host>:/config
- <path_to_download_folder_on_host>:/downloads
# VPN Watchdog: keeps port forwarding and qBittorrent in sync
gluetun-qbt-watchdog:
image: ghcr.io/brunoorsolon/gluetun-qbt-watchdog:latest
# For local development, replace the image line with:
# build: ./gluetun-qbt-watchdog
container_name: gluetun-qbt-watchdog
restart: unless-stopped
networks:
- vpn-net
depends_on:
- gluetun # value of GLUETUN_CONTAINER_NAME
- qbittorrent # value of QBT_CONTAINER_NAME
volumes:
# Required for last-resort container restarts and legacy qBittorrent password recovery.
- /var/run/docker.sock:/var/run/docker.sock
environment:
- GLUETUN_CONTAINER_NAME=${GLUETUN_CONTAINER_NAME:-gluetun}
- GLUETUN_API=http://${GLUETUN_CONTAINER_NAME:-gluetun}:${GLUETUN_API_PORT:-8000}
- GLUETUN_API_KEY=${GLUETUN_API_KEY}
- QBT_CONTAINER_NAME=${QBT_CONTAINER_NAME:-qbittorrent}
- QBT_API=http://${GLUETUN_CONTAINER_NAME:-gluetun}:${QBT_WEBUI_PORT:-8080}
- QBT_API_KEY=${QBT_API_KEY:-}
- QBT_AUTH_MODE=${QBT_AUTH_MODE:-auto}
- QBT_USER=${QBT_USER:-admin}
- QBT_PASS=${QBT_PASS:-}
- CHECK_INTERVAL=${CHECK_INTERVAL:-60}
- HEARTBEAT_CYCLE_FREQUENCY=${HEARTBEAT_CYCLE_FREQUENCY:-10}
- MAX_RESTART_WAIT=${MAX_RESTART_WAIT:-120}
- ADDITIONAL_RESTART=${ADDITIONAL_RESTART:-}