refactor docker-compse
This commit is contained in:
@@ -69,7 +69,7 @@ QBIT_PORT_UDP=44172
|
||||
FLARESOLVERR_PORT=8191
|
||||
TDARR_SERVER_PORT=8266
|
||||
WEBUI_PORT_TDARR=8265
|
||||
WEBUI_PORT_QBITTORRENT=8200
|
||||
RUTORRENT_PORT=8200
|
||||
|
||||
|
||||
# SWAG is configured for Reverse Proxy. Set your Internet gateway to redirect incoming ports 80 and 443
|
||||
@@ -94,7 +94,7 @@ STAGING=false
|
||||
HEALTH_VPN_DURATION_INITIAL=45s
|
||||
HEALTH_VPN_DURATION_ADDITION=30s
|
||||
UPDATER_PERIOD=8h
|
||||
TZ=Europe/Paris
|
||||
TZ=America/Chicago
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
|
||||
|
||||
@@ -1,115 +1,44 @@
|
||||
networks:
|
||||
media-network:
|
||||
name: media-network
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: ${DOCKER_SUBNET:?err}
|
||||
gateway: ${DOCKER_GATEWAY:?err}
|
||||
|
||||
services:
|
||||
gluetun:
|
||||
image: qmcgaw/gluetun:latest
|
||||
image: qmcgaw/gluetun
|
||||
container_name: gluetun
|
||||
restart: always
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
ports:
|
||||
- "8888:8888/tcp" # Gluetun Local Network HTTP proxy
|
||||
- "8388:8388/tcp" # Gluetun Local Network Shadowsocks
|
||||
- "8388:8388/udp" # Gluetun Local Network Shadowsocks
|
||||
- "${RUTORRENT_PORT}:8200" # WebUI Portal: qBittorrent
|
||||
- "${QBIT_PORT_TCP:?err}:44172/tcp"
|
||||
- "${QBIT_PORT_UDP:?err}:44172/udp"
|
||||
env_file:
|
||||
- ./docker-compose.env
|
||||
- /dev/net/tun
|
||||
volumes:
|
||||
- ${FOLDER_FOR_CONFIGS:?err}/gluetun:/gluetun
|
||||
- ./data/gluetun:/gluetun
|
||||
ports:
|
||||
- 11000:6881/udp #rutorrent
|
||||
- 11001:11001 #rutorrent
|
||||
- 11002:8080 #rutorrent
|
||||
- 11003:9000 #rutorremt
|
||||
- 11004:50000 #rutorrent
|
||||
environment:
|
||||
- PUID=${PUID:?err}
|
||||
- PGID=${PGID:?err}
|
||||
- TZ=${TIMEZONE:?err}
|
||||
- VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER:?err}
|
||||
- OPENVPN_USER=${VPN_USERNAME}
|
||||
- OPENVPN_PASSWORD=${VPN_PASSWORD}
|
||||
- SERVER_COUNTRIES=${SERVER_COUNTRIES}
|
||||
- SERVER_REGION=${SERVER_REGION}
|
||||
- SERVER_CITIES=${SERVER_CITIES}
|
||||
- SERVER_HOSTNAMES=${SERVER_HOSTNAMES}
|
||||
- FIREWALL_OUTBOUND_SUBNETS=${LOCAL_SUBNET:?err}
|
||||
- OPENVPN_CUSTOM_CONFIG=${OPENVPN_CUSTOM_CONFIG}
|
||||
- VPN_TYPE=${VPN_TYPE}
|
||||
- VPN_ENDPOINT_IP=${VPN_ENDPOINT_IP}
|
||||
- VPN_ENDPOINT_PORT=${VPN_ENDPOINT_PORT}
|
||||
- WIREGUARD_PUBLIC_KEY=${WIREGUARD_PUBLIC_KEY}
|
||||
- WIREGUARD_PRIVATE_KEY=${WIREGUARD_PRIVATE_KEY}
|
||||
- WIREGUARD_PRESHARED_KEY=${WIREGUARD_PRESHARED_KEY}
|
||||
- WIREGUARD_ADDRESSES=${WIREGUARD_ADDRESSES}
|
||||
- HTTPPROXY=on
|
||||
- SHADOWSOCKS=on
|
||||
# NOTE: Gluetun VPN container MUST ONLY connect to the media-network
|
||||
networks:
|
||||
- media-network
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Chicago
|
||||
- VPN_SERVICE_PROVIDER=airvpn
|
||||
- VPN_TYPE=openvpn # change it to your protocol
|
||||
- OPENVPN_CUSTOM_CONFIG=/gluetun/ipvanish.openvpn.conf
|
||||
- VPN_INTERFACE=tun0
|
||||
- FIREWALL_OUTBOUND_SUBNETS=192.168.0.1/24
|
||||
- SERVER_CITIES="Chicago Illinois"
|
||||
|
||||
geoip-updater:
|
||||
image: crazymax/geoip-updater:latest
|
||||
container_name: geoip-updater
|
||||
networks:
|
||||
- rtorrent-rutorrent
|
||||
volumes:
|
||||
- "./data/geoip:/data"
|
||||
env_file:
|
||||
- "./docker-compose.env"
|
||||
restart: always
|
||||
|
||||
rtorrent-rutorrent:
|
||||
rutorrent:
|
||||
image: crazymax/rtorrent-rutorrent:latest
|
||||
container_name: rtorrent-rutorrent
|
||||
networks:
|
||||
- media-network
|
||||
expose:
|
||||
- "${RT_DHT_PORT}/udp"
|
||||
- "${XMLRPC_PORT}"
|
||||
- "${RUTORRENT_PORT}"
|
||||
- "${WEBDAV_PORT}"
|
||||
- "${RT_INC_PORT}"
|
||||
ports:
|
||||
- target: ${RT_DHT_PORT}
|
||||
published: ${RT_DHT_PORT}
|
||||
protocol: udp
|
||||
- target: ${RUTORRENT_PORT}
|
||||
published: ${RUTORRENT_PORT}
|
||||
protocol: tcp
|
||||
- target: ${WEBDAV_PORT}
|
||||
published: ${WEBDAV_PORT}
|
||||
protocol: tcp
|
||||
- target: ${RT_INC_PORT}
|
||||
published: ${RT_INC_PORT}
|
||||
protocol: tcp
|
||||
env_file:
|
||||
- "rtorrent-rutorrent.env"
|
||||
- ".env"
|
||||
container_name: rutorrent
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Chicago
|
||||
- XMLRPC_PORT=11001 #the default port is 8000 but mine was already in use. if yours is free then you don't need this line and you can change this line '- 11001:11001' in ports to '- 11001:8000'
|
||||
volumes:
|
||||
- "./data:/data"
|
||||
- "/data:/downloads"
|
||||
- "./passwd:/passwd"
|
||||
ulimits:
|
||||
nproc: 65535
|
||||
nofile:
|
||||
soft: 32000
|
||||
hard: 40000
|
||||
restart: always
|
||||
|
||||
rtorrent-logs:
|
||||
image: bash
|
||||
container_name: rtorrent-rutorrent-logs
|
||||
command: bash -c 'tail -f /log/*.log'
|
||||
network_mode: none
|
||||
depends_on:
|
||||
- rtorrent-rutorrent
|
||||
volumes:
|
||||
- "./data/rtorrent/log:/log"
|
||||
- /volume1/docker/rutorrent/data:/data
|
||||
- /volume1/docker/rutorrent/downloads:/downloads
|
||||
- /volume1/docker/rutorrent/password:/passwd
|
||||
network_mode: service:gluetun
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: always
|
||||
Reference in New Issue
Block a user