Compare commits
12 Commits
a572313d3d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff4bea25f6 | ||
|
|
2abb9cb5d2 | ||
|
|
8231589d4d | ||
|
|
1ffdc6caaf | ||
|
|
eb5693322d | ||
|
|
773fb9067b | ||
|
|
31a5e76cee | ||
|
|
db5394a2c5 | ||
|
|
e07521a6ae | ||
|
|
8a2240a43e | ||
|
|
0dcd0c9823 | ||
|
|
5ffc709df3 |
@@ -10,7 +10,7 @@ services:
|
||||
retries: 5
|
||||
timeout: 5s
|
||||
volumes:
|
||||
- database:/var/lib/postgresql/data
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${PG_PASS:?database password required}
|
||||
POSTGRES_USER: ${PG_USER:-authentik}
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
retries: 5
|
||||
timeout: 3s
|
||||
volumes:
|
||||
- redis:/data
|
||||
- ./data/redis:/data
|
||||
app:
|
||||
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2024.12.3}
|
||||
restart: unless-stopped
|
||||
@@ -90,12 +90,6 @@ services:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
database:
|
||||
driver: local
|
||||
redis:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
proxy-net:
|
||||
external: true
|
||||
|
||||
@@ -92,6 +92,24 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
(oidc) {
|
||||
{args[0]}.tremendousturtle.tools {
|
||||
import ttt-log {args[0]}
|
||||
import tls
|
||||
@not_cf header !CF-Connecting-IP
|
||||
@cf header CF-Connecting-IP *
|
||||
|
||||
reverse_proxy @not_cf {args[0]}-app-1:{args[1]} {
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-Port {server_port}
|
||||
}
|
||||
|
||||
reverse_proxy @cf {args[0]}-app-1:{args[1]} {
|
||||
header_up X-Real-IP {http.request.header.CF-Connecting-IP}
|
||||
header_up X-Forwarded-Port {server_port}
|
||||
}
|
||||
}
|
||||
}
|
||||
(redirect) {
|
||||
{args[0]}.tremendousturtle.tools {
|
||||
import tls
|
||||
@@ -174,6 +192,9 @@ import authentik dozzle
|
||||
import authentik tautulli
|
||||
#import authentik-test stash
|
||||
|
||||
# Authentik OIDC Configs
|
||||
import oidc komodo 9120
|
||||
|
||||
stash.tremendousturtle.tools {
|
||||
import ttt-log stash
|
||||
import tls
|
||||
@@ -181,8 +202,8 @@ stash.tremendousturtle.tools {
|
||||
@cf header CF-Connecting-IP *
|
||||
|
||||
# Match the bedroom Nvidia Shield IP to skip Authentik
|
||||
@shield client_ip 192.168.1.142
|
||||
reverse_proxy @shield stashapp-app-1:9999 {
|
||||
@exclude client_ip 192.168.1.142 192.168.1.234 127.0.0.1
|
||||
reverse_proxy @exclude stashapp-app-1:9999 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-Port {server_port}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,9 @@ services:
|
||||
- ./data/site:/srv
|
||||
- ./data/logs:/logs
|
||||
- ./config:/etc/caddy
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
- ./data/caddy_data:/data
|
||||
- ./data/caddy_config:/config
|
||||
|
||||
networks:
|
||||
proxy-net:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
|
||||
41
komodo/.env
41
komodo/.env
@@ -12,14 +12,14 @@ COMPOSE_KOMODO_IMAGE_TAG=latest
|
||||
|
||||
## Note: 🚨 Podman does NOT support local logging driver 🚨. See Podman options here:
|
||||
## `https://docs.podman.io/en/v4.6.1/markdown/podman-run.1.html#log-driver-driver`
|
||||
COMPOSE_LOGGING_DRIVER=local # Enable log rotation with the local driver.
|
||||
COMPOSE_LOGGING_DRIVER=journald # Enable log rotation with the local driver.
|
||||
|
||||
## DB credentials - Ignored for Sqlite
|
||||
DB_USERNAME=admin
|
||||
DB_PASSWORD=admin
|
||||
KOMODO_DB_USERNAME=admin
|
||||
KOMODO_DB_PASSWORD_FILE=/run/secrets/KOMODO_DB_PASSWORD
|
||||
|
||||
## Configure a secure passkey to authenticate between Core / Periphery.
|
||||
PASSKEY=a_random_passkey
|
||||
KOMODO_PASSKEY_FILE=/run/secrets/KOMODO_PASSKEY
|
||||
|
||||
#=-------------------------=#
|
||||
#= Komodo Core Environment =#
|
||||
@@ -32,7 +32,7 @@ PASSKEY=a_random_passkey
|
||||
## Docs: https://docs.docker.com/compose/how-tos/use-secrets/#examples
|
||||
|
||||
## Used for Oauth / Webhook url suggestion / Caddy reverse proxy.
|
||||
KOMODO_HOST=https://demo.komo.do
|
||||
KOMODO_HOST=https://komodo.tremendousturtle.tools
|
||||
## Displayed in the browser tab.
|
||||
KOMODO_TITLE=Komodo
|
||||
## Create a server matching this address as the "first server".
|
||||
@@ -45,22 +45,20 @@ KOMODO_DISABLE_CONFIRM_DIALOG=false
|
||||
## status / container status / system stats / alerting.
|
||||
## Options: 1-sec, 5-sec, 15-sec, 1-min, 5-min.
|
||||
## Default: 15-sec
|
||||
KOMODO_MONITORING_INTERVAL="15-sec"
|
||||
KOMODO_MONITORING_INTERVAL="5-sec"
|
||||
## Rate Komodo polls Resources for updates,
|
||||
## like outdated commit hash.
|
||||
## Options: 1-min, 5-min, 15-min, 30-min, 1-hr.
|
||||
## Default: 5-min
|
||||
KOMODO_RESOURCE_POLL_INTERVAL="5-min"
|
||||
KOMODO_RESOURCE_POLL_INTERVAL="1-min"
|
||||
|
||||
## Used to auth against periphery. Alt: KOMODO_PASSKEY_FILE
|
||||
KOMODO_PASSKEY=${PASSKEY}
|
||||
## Used to auth incoming webhooks. Alt: KOMODO_WEBHOOK_SECRET_FILE
|
||||
KOMODO_WEBHOOK_SECRET=a_random_secret
|
||||
KOMODO_WEBHOOK_SECRET_FILE=/run/secrets/KOMODO_WEBHOOK_SECRET
|
||||
## Used to generate jwt. Alt: KOMODO_JWT_SECRET_FILE
|
||||
KOMODO_JWT_SECRET=a_random_jwt_secret
|
||||
KOMODO_JWT_SECRET_FILE=/run/secrets/KOMODO_JWT_SECRET
|
||||
|
||||
## Enable login with username + password.
|
||||
KOMODO_LOCAL_AUTH=true
|
||||
KOMODO_LOCAL_AUTH=false
|
||||
## Disable new user signups.
|
||||
KOMODO_DISABLE_USER_REGISTRATION=false
|
||||
## All new logins are auto enabled
|
||||
@@ -72,18 +70,18 @@ KOMODO_TRANSPARENT_MODE=false
|
||||
|
||||
## Time to live for jwt tokens.
|
||||
## Options: 1-hr, 12-hr, 1-day, 3-day, 1-wk, 2-wk
|
||||
KOMODO_JWT_TTL="1-day"
|
||||
KOMODO_JWT_TTL="1-wk"
|
||||
|
||||
## OIDC Login
|
||||
KOMODO_OIDC_ENABLED=false
|
||||
KOMODO_OIDC_ENABLED=true
|
||||
## Must reachable from Komodo Core container
|
||||
# KOMODO_OIDC_PROVIDER=https://oidc.provider.internal/application/o/komodo
|
||||
KOMODO_OIDC_PROVIDER=https://authentik.tremendousturtle.tools/application/o/komodo/
|
||||
## Change the host to one reachable be reachable by users (optional if it is the same as above).
|
||||
## DO NOT include the `path` part of the URL.
|
||||
# KOMODO_OIDC_REDIRECT_HOST=https://oidc.provider.external
|
||||
KOMODO_OIDC_REDIRECT_HOST=https://authentik.tremendousturtle.tools
|
||||
## Your client credentials
|
||||
# KOMODO_OIDC_CLIENT_ID= # Alt: KOMODO_OIDC_CLIENT_ID_FILE
|
||||
# KOMODO_OIDC_CLIENT_SECRET= # Alt: KOMODO_OIDC_CLIENT_SECRET_FILE
|
||||
KOMODO_OIDC_CLIENT_ID_FILE=/run/secrets/KOMODO_OIDC_CLIENT_ID # Alt: KOMODO_OIDC_CLIENT_ID_FILE
|
||||
KOMODO_OIDC_CLIENT_SECRET_FILE=/run/secrets/KOMODO_OIDC_CLIENT_SECRET # Alt: KOMODO_OIDC_CLIENT_SECRET_FILE
|
||||
## Make usernames the full email.
|
||||
# KOMODO_OIDC_USE_FULL_EMAIL=true
|
||||
## Add additional trusted audiences for token claims verification.
|
||||
@@ -115,8 +113,11 @@ KOMODO_HETZNER_TOKEN= # Alt: KOMODO_HETZNER_TOKEN_FILE
|
||||
## Full variable list + descriptions are available here:
|
||||
## 🦎 https://github.com/mbecker20/komodo/blob/main/config/periphery.config.toml 🦎
|
||||
|
||||
## Periphery passkeys must include KOMODO_PASSKEY to authenticate
|
||||
PERIPHERY_PASSKEYS=${PASSKEY}
|
||||
## Periphery passkeys must include KOMODO_PASSKEY to authenticate.
|
||||
PERIPHERY_PASSKEYS_FILE=${KOMODO_PASSKEY_FILE}
|
||||
|
||||
## Specify the root directory used by Periphery agent.
|
||||
PERIPHERY_ROOT_DIRECTORY=/etc/komodo
|
||||
|
||||
## Enable SSL using self signed certificates.
|
||||
## Connect to Periphery at https://address:8120.
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
## 1. MongoDB
|
||||
## 2. Komodo Core
|
||||
## 3. Komodo Periphery
|
||||
|
||||
name: komodo
|
||||
services:
|
||||
db:
|
||||
@@ -22,13 +21,15 @@ services:
|
||||
# ports:
|
||||
# - 27017:27017
|
||||
volumes:
|
||||
- mongo-data:/data/db
|
||||
- mongo-config:/data/configdb
|
||||
- ./data/mongo-data:/data/db
|
||||
- ./config/mongo-config:/data/configdb
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: ${DB_USERNAME}
|
||||
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD}
|
||||
MONGO_INITDB_ROOT_USERNAME: ${KOMODO_DB_USERNAME}
|
||||
MONGO_INITDB_ROOT_PASSWORD_FILE: ${KOMODO_DB_PASSWORD_FILE}
|
||||
secrets:
|
||||
- KOMODO_DB_PASSWORD
|
||||
|
||||
core:
|
||||
app:
|
||||
image: ghcr.io/mbecker20/komodo:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
|
||||
labels:
|
||||
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
|
||||
@@ -39,24 +40,29 @@ services:
|
||||
driver: ${COMPOSE_LOGGING_DRIVER:-local}
|
||||
networks:
|
||||
- default
|
||||
- proxy-net
|
||||
ports:
|
||||
- 9120:9120
|
||||
env_file: ./compose.env
|
||||
env_file: ./.env
|
||||
environment:
|
||||
KOMODO_DATABASE_ADDRESS: db:27017
|
||||
KOMODO_DATABASE_USERNAME: ${DB_USERNAME}
|
||||
KOMODO_DATABASE_PASSWORD: ${DB_PASSWORD}
|
||||
KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME}
|
||||
KOMODO_DATABASE_PASSWORD_FILE: ${KOMODO_DB_PASSWORD_FILE}
|
||||
KOMODO_LOGGING_LEVEL: info
|
||||
volumes:
|
||||
## Core cache for repos for latest commit hash / contents
|
||||
- repo-cache:/repo-cache
|
||||
- ./data/repo-cache:/repo-cache
|
||||
## Store sync files on server
|
||||
# - /path/to/syncs:/syncs
|
||||
- ./data/syncs:/syncs
|
||||
## Optionally mount a custom core.config.toml
|
||||
# - /path/to/core.config.toml:/config/config.toml
|
||||
## Allows for systemd Periphery connection at
|
||||
## "http://host.docker.internal:8120"
|
||||
# extra_hosts:
|
||||
# - host.docker.internal:host-gateway
|
||||
secrets:
|
||||
- KOMODO_DB_PASSWORD
|
||||
- KOMODO_PASSKEY
|
||||
- KOMODO_WEBHOOK_SECRET
|
||||
- KOMODO_JWT_SECRET
|
||||
- KOMODO_OIDC_CLIENT_SECRET
|
||||
- KOMODO_OIDC_CLIENT_ID
|
||||
|
||||
## Deploy Periphery container using this block,
|
||||
## or deploy the Periphery binary with systemd using
|
||||
@@ -70,34 +76,40 @@ services:
|
||||
driver: ${COMPOSE_LOGGING_DRIVER:-local}
|
||||
networks:
|
||||
- default
|
||||
env_file: ./compose.env
|
||||
env_file: ./.env
|
||||
environment:
|
||||
PERIPHERY_REPO_DIR: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}/repos
|
||||
PERIPHERY_STACK_DIR: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}/stacks
|
||||
PERIPHERY_SSL_KEY_FILE: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}/ssl/key.pem
|
||||
PERIPHERY_SSL_CERT_FILE: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}/ssl/cert.pem
|
||||
volumes:
|
||||
## Mount external docker socket
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
## Allow Periphery to see processes outside of container
|
||||
- /proc:/proc
|
||||
## use self signed certs in docker volume,
|
||||
## or mount your own signed certs.
|
||||
- ssl-certs:/etc/komodo/ssl
|
||||
## manage repos in a docker volume,
|
||||
## or change it to an accessible host directory.
|
||||
- repos:/etc/komodo/repos
|
||||
## manage stack files in a docker volume,
|
||||
## or change it to an accessible host directory.
|
||||
- stacks:/etc/komodo/stacks
|
||||
## Optionally mount a path to store compose files
|
||||
# - /path/to/compose:/host/compose
|
||||
|
||||
volumes:
|
||||
# Mongo
|
||||
mongo-data:
|
||||
mongo-config:
|
||||
# Core
|
||||
repo-cache:
|
||||
# Periphery
|
||||
ssl-certs:
|
||||
repos:
|
||||
stacks:
|
||||
## Specify the Periphery agent root directory.
|
||||
## Must be the same inside and outside the container,
|
||||
## or docker will get confused. See https://github.com/mbecker20/komodo/discussions/180.
|
||||
## Default: /etc/komodo.
|
||||
- ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}:${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}
|
||||
secrets:
|
||||
- KOMODO_PASSKEY
|
||||
|
||||
networks:
|
||||
default: {}
|
||||
proxy-net:
|
||||
external: true
|
||||
|
||||
secrets:
|
||||
KOMODO_DB_PASSWORD:
|
||||
file: ./secrets/KOMODO_DB_PASSWORD
|
||||
KOMODO_PASSKEY:
|
||||
file: ./secrets/KOMODO_PASSKEY
|
||||
KOMODO_WEBHOOK_SECRET:
|
||||
file: ./secrets/KOMODO_WEBHOOK_SECRET
|
||||
KOMODO_JWT_SECRET:
|
||||
file: ./secrets/KOMODO_JWT_SECRET
|
||||
KOMODO_OIDC_CLIENT_SECRET:
|
||||
file: ./secrets/KOMODO_OIDC_CLIENT_SECRET
|
||||
KOMODO_OIDC_CLIENT_ID:
|
||||
file: ./secrets/KOMODO_OIDC_CLIENT_ID
|
||||
0
media-dude/.env
Normal file
0
media-dude/.env
Normal file
0
media-dude/docker-compose.yml
Normal file
0
media-dude/docker-compose.yml
Normal file
74
media-dude/torrentarr/compose.torrentarr.yml
Normal file
74
media-dude/torrentarr/compose.torrentarr.yml
Normal file
@@ -0,0 +1,74 @@
|
||||
services:
|
||||
transmission:
|
||||
image: lscr.io/linuxserver/transmission:latest
|
||||
environment:
|
||||
DOCKER_MODS: linuxserver/mods:transmission-env-var-settings
|
||||
PUID: 998 # media user
|
||||
PGID: 998 # media group
|
||||
UMASK: "002"
|
||||
TZ: America/Los_Angeles
|
||||
TRANSMISSION_DOWNLOAD_DIR: ${TORRENTARR_DOWNLOAD_DIR:?error}/complete
|
||||
TRANSMISSION_INCOMPLETE_DIR: ${TORRENTARR_DOWNLOAD_DIR:?error}/incomplete
|
||||
TRANSMISSION_SPEED_LIMIT_UP: "3750"
|
||||
TRANSMISSION_SPEED_LIMIT_UP_ENABLED: "true"
|
||||
TRANSMISSION_WATCH_DIR_ENABLED: "false"
|
||||
TRANSMISSION_RPC_PORT: ${TORRENTARR_TRANSMISSION_RPC_PORT:?error}
|
||||
TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: "false"
|
||||
volumes:
|
||||
- ./transmission_config:/config
|
||||
- ${TORRENTARR_DOWNLOAD_DIR:?error}:${TORRENTARR_DOWNLOAD_DIR:?error}
|
||||
network_mode: "service:gluetun"
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
gluetun:
|
||||
condition: service_healthy
|
||||
|
||||
gluetun:
|
||||
image: qmcgaw/gluetun
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
volumes:
|
||||
- gluetun_forwarding:/tmp/gluetun_forwarding
|
||||
ports:
|
||||
- ${TORRENTARR_TRANSMISSION_RPC_PORT:?error}:${TORRENTARR_TRANSMISSION_RPC_PORT:?error}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
VPN_SERVICE_PROVIDER: protonvpn
|
||||
VPN_TYPE: wireguard
|
||||
VPN_PORT_FORWARDING: on
|
||||
VPN_PORT_FORWARDING_STATUS_FILE: /tmp/gluetun_forwarding/forwarded_port
|
||||
PORT_FORWARD_ONLY: "on"
|
||||
SERVER_COUNTRIES: United States
|
||||
SERVER_CITIES: Los Angeles
|
||||
UPDATER_PERIOD: 24h
|
||||
secrets:
|
||||
- wireguard_private_key
|
||||
port-watcher:
|
||||
build: ../port-watcher
|
||||
volumes:
|
||||
- gluetun_forwarding:/watch
|
||||
environment:
|
||||
PORT_FILE: /watch/forwarded_port
|
||||
TRANSMISSION_HOST: gluetun
|
||||
TRANSMISSION_PORT: ${TORRENTARR_TRANSMISSION_RPC_PORT:?error}
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "test", "-f", "/watch/forwarded_port"]
|
||||
interval: 10s
|
||||
timeout: 60s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
depends_on:
|
||||
transmission:
|
||||
condition: service_started
|
||||
gluetun:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
gluetun_forwarding:
|
||||
|
||||
secrets:
|
||||
wireguard_private_key:
|
||||
file: ./secrets/wireguard_private_key
|
||||
4
media-dude/torrentarr/movies/.env
Normal file
4
media-dude/torrentarr/movies/.env
Normal file
@@ -0,0 +1,4 @@
|
||||
COMPOSE_FILE=compose.yml:../compose.torrentarr.yml
|
||||
TORRENTARR_DOWNLOAD_DIR=/media/movies/torrents
|
||||
TORRENTARR_TRANSMISSION_RPC_PORT=10011
|
||||
COMPOSE_BAKE=true
|
||||
15
media-dude/torrentarr/movies/compose.yml
Normal file
15
media-dude/torrentarr/movies/compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
name: torrentarr-movies
|
||||
services:
|
||||
radarr:
|
||||
image: ghcr.io/hotio/radarr
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "7878:7878"
|
||||
environment:
|
||||
PUID: 998
|
||||
PGID: 998
|
||||
UMASK: "002"
|
||||
TZ: America/Los_Angeles
|
||||
volumes:
|
||||
- ./radarr_config:/config
|
||||
- /media/movies/library:/media/movies/library
|
||||
8
media-dude/torrentarr/port-watcher/Dockerfile
Normal file
8
media-dude/torrentarr/port-watcher/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM python:3.11-alpine
|
||||
|
||||
WORKDIR /app
|
||||
COPY port-watcher.py .
|
||||
|
||||
RUN pip install watchdog transmission-rpc
|
||||
|
||||
CMD ["python", "port-watcher.py"]
|
||||
82
media-dude/torrentarr/port-watcher/port-watcher.py
Normal file
82
media-dude/torrentarr/port-watcher/port-watcher.py
Normal file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
from transmission_rpc import Client
|
||||
from watchdog.observers import Observer
|
||||
from watchdog.events import FileSystemEventHandler
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(message)s')
|
||||
logger = logging.getLogger()
|
||||
|
||||
PORT_FILE = os.getenv('PORT_FILE', '/watch/forwarded_port')
|
||||
TRANSMISSION_HOST = os.getenv('TRANSMISSION_HOST', 'gluetun')
|
||||
TRANSMISSION_PORT = os.getenv('TRANSMISSION_PORT', 9091)
|
||||
|
||||
class PortFileHandler(FileSystemEventHandler):
|
||||
def __init__(self):
|
||||
self.last_port = None
|
||||
self.transmission_client = Client(host=TRANSMISSION_HOST, port=TRANSMISSION_PORT)
|
||||
self.check_port_file() # Initial check
|
||||
|
||||
def on_modified(self, event):
|
||||
if not event.is_directory and event.src_path == PORT_FILE:
|
||||
self.check_port_file()
|
||||
|
||||
def check_port_file(self):
|
||||
try:
|
||||
if not os.path.exists(PORT_FILE):
|
||||
logger.info(f"Port file not found: {PORT_FILE}")
|
||||
return
|
||||
|
||||
with open(PORT_FILE, 'r') as f:
|
||||
port = f.read().strip()
|
||||
|
||||
if port != self.last_port and port.isdigit():
|
||||
self.last_port = port
|
||||
logger.info(f"Port forwarding changed to: {port}")
|
||||
self.update_transmission(port)
|
||||
except Exception as e:
|
||||
logger.error(f"Error checking port file: {e}")
|
||||
|
||||
def update_transmission(self, port):
|
||||
max_attempts = 5
|
||||
attempt = 1
|
||||
delay = 5 # seconds between retry attempts
|
||||
|
||||
while attempt <= max_attempts:
|
||||
logger.info(f"Attempt {attempt}/{max_attempts}: Setting Transmission peer_port to {port}")
|
||||
try:
|
||||
self.transmission_client.set_session(peer_port=int(port))
|
||||
logger.info(f"Successfully updated Transmission peer_port to {port}")
|
||||
logger.info(f"Testing Transmission peer port...")
|
||||
if self.transmission_client.port_test():
|
||||
logger.info("Transmission peer port is open")
|
||||
else:
|
||||
logger.warning("Transmission peer port does not appear to be open")
|
||||
return
|
||||
except Exception as e:
|
||||
logger.warning(f"Attempt {attempt}/{max_attempts} failed: {e}")
|
||||
if attempt < max_attempts:
|
||||
logger.info(f"Retrying in {delay} seconds...")
|
||||
time.sleep(delay)
|
||||
attempt += 1
|
||||
|
||||
logger.error(f"Failed to update Transmission peer_port after {max_attempts} attempts")
|
||||
|
||||
if __name__ == "__main__":
|
||||
path = os.path.dirname(PORT_FILE)
|
||||
logger.info(f"Starting port-watcher monitoring {PORT_FILE}")
|
||||
|
||||
event_handler = PortFileHandler()
|
||||
observer = Observer()
|
||||
observer.schedule(event_handler, path, recursive=False)
|
||||
observer.start()
|
||||
|
||||
try:
|
||||
while True:
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
observer.stop()
|
||||
observer.join()
|
||||
4
media-dude/torrentarr/tv/.env
Normal file
4
media-dude/torrentarr/tv/.env
Normal file
@@ -0,0 +1,4 @@
|
||||
COMPOSE_FILE=compose.yml:../compose.torrentarr.yml
|
||||
TORRENTARR_DOWNLOAD_DIR=/media/tv/torrents
|
||||
TORRENTARR_TRANSMISSION_RPC_PORT=10010
|
||||
COMPOSE_BAKE=true
|
||||
15
media-dude/torrentarr/tv/compose.yml
Normal file
15
media-dude/torrentarr/tv/compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
name: torrentarr-tv
|
||||
services:
|
||||
sonarr:
|
||||
image: ghcr.io/hotio/sonarr
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8989:8989"
|
||||
environment:
|
||||
PUID: 998
|
||||
PGID: 998
|
||||
UMASK: "002"
|
||||
TZ: America/Los_Angeles
|
||||
volumes:
|
||||
- ./sonarr_config:/config
|
||||
- /media/tv/library:/media/tv/library
|
||||
@@ -33,21 +33,21 @@
|
||||
"name": "4k Movies",
|
||||
"enabled": true,
|
||||
"type": "movie",
|
||||
"lastScan": 1736797500041
|
||||
"lastScan": 1741801200034
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "Movies",
|
||||
"enabled": true,
|
||||
"type": "movie",
|
||||
"lastScan": 1736797500057
|
||||
"lastScan": 1741801200054
|
||||
},
|
||||
{
|
||||
"id": "1",
|
||||
"name": "TV Shows",
|
||||
"enabled": true,
|
||||
"type": "show",
|
||||
"lastScan": 1736797500105
|
||||
"lastScan": 1741801200272
|
||||
}
|
||||
],
|
||||
"machineId": "5e16f8ceb511bde943f92bbe07e3e6e33307eb16"
|
||||
|
||||
89
scripts/torrentarr.sh
Executable file
89
scripts/torrentarr.sh
Executable file
@@ -0,0 +1,89 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define available options as a simple array
|
||||
OPTIONS=("tv" "movies" "all")
|
||||
|
||||
# Default values
|
||||
TARGET_ALL=true
|
||||
INSTANCE="all"
|
||||
ACTION="up"
|
||||
|
||||
# Parse command line arguments
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
--down|-d)
|
||||
ACTION="down"
|
||||
;;
|
||||
--restart|-r)
|
||||
ACTION="restart"
|
||||
;;
|
||||
*)
|
||||
# Assume this is the instance name
|
||||
INSTANCE="$1"
|
||||
# Only set TARGET_ALL to false if a specific instance is provided
|
||||
if [ "$INSTANCE" != "all" ]; then
|
||||
TARGET_ALL=false
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Validate the instance name
|
||||
if ! [[ " ${OPTIONS[*]} " == *" ${INSTANCE} "* ]]; then
|
||||
echo "Unknown instance: $INSTANCE"
|
||||
echo "Valid options: ${OPTIONS[*]}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Function to execute docker compose commands
|
||||
run_docker_compose() {
|
||||
local instance=$1
|
||||
local action=$2
|
||||
local ENV_FILE="./${instance}.env"
|
||||
|
||||
if [ "$action" == "restart" ]; then
|
||||
echo "Restart: Stopping $instance torrentarr instance..."
|
||||
docker compose --env-file "$ENV_FILE" down --remove-orphans
|
||||
echo "Restart: Starting $instance torrentarr instance..."
|
||||
docker compose --env-file "$ENV_FILE" up -d
|
||||
else
|
||||
if [ "$action" == "down" ]; then
|
||||
echo "Stopping $inst torrentarr instance..."
|
||||
docker compose --env-file "$ENV_FILE" down --remove-orphans
|
||||
echo "Stopped $inst torrentarr instance."
|
||||
elif [ "$action" == "up" ]; then
|
||||
echo "Starting $inst torrentarr instance..."
|
||||
docker compose --env-file "$ENV_FILE" up -d
|
||||
echo "Started $inst torrentarr instance."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Handle all instances or specific instance
|
||||
if [ "$TARGET_ALL" = true ]; then
|
||||
if [ "$ACTION" == "up" ]; then
|
||||
echo "Starting all instances..."
|
||||
elif [ "$ACTION" == "down" ]; then
|
||||
echo "Stopping all instances..."
|
||||
elif [ "$ACTION" == "restart" ]; then
|
||||
echo "Restarting all instances..."
|
||||
fi
|
||||
|
||||
# Loop through all options except "all"
|
||||
for inst in "${OPTIONS[@]}"; do
|
||||
if [ "$inst" != "all" ]; then
|
||||
run_docker_compose "$inst" $ACTION
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$ACTION" == "up" ]; then
|
||||
echo "Started all instances"
|
||||
elif [ "$ACTION" == "down" ]; then
|
||||
echo "Stopped all instances"
|
||||
elif [ "$ACTION" == "restart" ]; then
|
||||
echo "Restarted all instances"
|
||||
fi
|
||||
else
|
||||
run_docker_compose "$INSTANCE" $ACTION
|
||||
fi
|
||||
3
seedsync/.gitignore
vendored
Normal file
3
seedsync/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
config/**/*.persist
|
||||
config/**/*.bak
|
||||
config/**/*.backup
|
||||
35
seedsync/config/seedsync_junk/settings.cfg
Normal file
35
seedsync/config/seedsync_junk/settings.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
[General]
|
||||
debug = False
|
||||
verbose = False
|
||||
|
||||
[Lftp]
|
||||
remote_address = asia.feralhosting.com
|
||||
remote_username = tinyturtle
|
||||
remote_password = password
|
||||
remote_port = 22
|
||||
remote_path = /media/dmg/tinyturtle/junk_transfer
|
||||
local_path = /downloads
|
||||
remote_path_to_scan_script = /media/dmg/tinyturtle/.seedsync_junk_bin
|
||||
use_ssh_key = True
|
||||
num_max_parallel_downloads = 1
|
||||
num_max_parallel_files_per_download = 2
|
||||
num_max_connections_per_root_file = 5
|
||||
num_max_connections_per_dir_file = 5
|
||||
num_max_total_connections = 5
|
||||
use_temp_file = True
|
||||
|
||||
[Controller]
|
||||
interval_ms_remote_scan = 30000
|
||||
interval_ms_local_scan = 10000
|
||||
interval_ms_downloading_scan = 1000
|
||||
extract_path = /seedsynctmp
|
||||
use_local_path_as_extract_path = True
|
||||
|
||||
[Web]
|
||||
port = 8802
|
||||
|
||||
[AutoQueue]
|
||||
enabled = True
|
||||
patterns_only = False
|
||||
auto_extract = True
|
||||
|
||||
35
seedsync/config/seedsync_junk_movies/settings.cfg
Normal file
35
seedsync/config/seedsync_junk_movies/settings.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
[General]
|
||||
debug = False
|
||||
verbose = False
|
||||
|
||||
[Lftp]
|
||||
remote_address = asia.feralhosting.com
|
||||
remote_username = tinyturtle
|
||||
remote_password = password
|
||||
remote_port = 22
|
||||
remote_path = /media/dmg/tinyturtle/junk_transfer_movies
|
||||
local_path = /downloads
|
||||
remote_path_to_scan_script = /media/dmg/tinyturtle/.seedsync_junk_movies_bin
|
||||
use_ssh_key = True
|
||||
num_max_parallel_downloads = 1
|
||||
num_max_parallel_files_per_download = 2
|
||||
num_max_connections_per_root_file = 5
|
||||
num_max_connections_per_dir_file = 5
|
||||
num_max_total_connections = 5
|
||||
use_temp_file = True
|
||||
|
||||
[Controller]
|
||||
interval_ms_remote_scan = 30000
|
||||
interval_ms_local_scan = 10000
|
||||
interval_ms_downloading_scan = 1000
|
||||
extract_path = /seedsynctmp
|
||||
use_local_path_as_extract_path = True
|
||||
|
||||
[Web]
|
||||
port = 8805
|
||||
|
||||
[AutoQueue]
|
||||
enabled = True
|
||||
patterns_only = False
|
||||
auto_extract = True
|
||||
|
||||
35
seedsync/config/seedsync_junk_packs/settings.cfg
Normal file
35
seedsync/config/seedsync_junk_packs/settings.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
[General]
|
||||
debug = False
|
||||
verbose = False
|
||||
|
||||
[Lftp]
|
||||
remote_address = asia.feralhosting.com
|
||||
remote_username = tinyturtle
|
||||
remote_password = password
|
||||
remote_port = 22
|
||||
remote_path = /media/dmg/tinyturtle/junk_transfer_packs
|
||||
local_path = /downloads
|
||||
remote_path_to_scan_script = /media/dmg/tinyturtle/.seedsync_junk_packs_bin
|
||||
use_ssh_key = True
|
||||
num_max_parallel_downloads = 1
|
||||
num_max_parallel_files_per_download = 2
|
||||
num_max_connections_per_root_file = 5
|
||||
num_max_connections_per_dir_file = 5
|
||||
num_max_total_connections = 5
|
||||
use_temp_file = True
|
||||
|
||||
[Controller]
|
||||
interval_ms_remote_scan = 30000
|
||||
interval_ms_local_scan = 10000
|
||||
interval_ms_downloading_scan = 1000
|
||||
extract_path = /seedsynctmp
|
||||
use_local_path_as_extract_path = True
|
||||
|
||||
[Web]
|
||||
port = 8804
|
||||
|
||||
[AutoQueue]
|
||||
enabled = True
|
||||
patterns_only = False
|
||||
auto_extract = True
|
||||
|
||||
35
seedsync/config/seedsync_movies/settings.cfg
Normal file
35
seedsync/config/seedsync_movies/settings.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
[General]
|
||||
debug = False
|
||||
verbose = False
|
||||
|
||||
[Lftp]
|
||||
remote_address = asia.feralhosting.com
|
||||
remote_username = tinyturtle
|
||||
remote_password = password
|
||||
remote_port = 22
|
||||
remote_path = /media/dmg/tinyturtle/transfer/movies
|
||||
local_path = /downloads
|
||||
remote_path_to_scan_script = /media/dmg/tinyturtle/.seedsync_movies_bin
|
||||
use_ssh_key = True
|
||||
num_max_parallel_downloads = 1
|
||||
num_max_parallel_files_per_download = 1
|
||||
num_max_connections_per_root_file = 6
|
||||
num_max_connections_per_dir_file = 6
|
||||
num_max_total_connections = 6
|
||||
use_temp_file = True
|
||||
|
||||
[Controller]
|
||||
interval_ms_remote_scan = 30000
|
||||
interval_ms_local_scan = 10000
|
||||
interval_ms_downloading_scan = 1000
|
||||
extract_path = /seedsynctmp
|
||||
use_local_path_as_extract_path = True
|
||||
|
||||
[Web]
|
||||
port = 8801
|
||||
|
||||
[AutoQueue]
|
||||
enabled = True
|
||||
patterns_only = False
|
||||
auto_extract = True
|
||||
|
||||
35
seedsync/config/seedsync_other/settings.cfg
Normal file
35
seedsync/config/seedsync_other/settings.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
[General]
|
||||
debug = False
|
||||
verbose = False
|
||||
|
||||
[Lftp]
|
||||
remote_address = asia.feralhosting.com
|
||||
remote_username = tinyturtle
|
||||
remote_password = password
|
||||
remote_port = 22
|
||||
remote_path = /media/dmg/tinyturtle/transfer/other
|
||||
local_path = /downloads
|
||||
remote_path_to_scan_script = /media/dmg/tinyturtle/.seedsync_other_bin
|
||||
use_ssh_key = True
|
||||
num_max_parallel_downloads = 1
|
||||
num_max_parallel_files_per_download = 2
|
||||
num_max_connections_per_root_file = 4
|
||||
num_max_connections_per_dir_file = 4
|
||||
num_max_total_connections = 4
|
||||
use_temp_file = True
|
||||
|
||||
[Controller]
|
||||
interval_ms_remote_scan = 30000
|
||||
interval_ms_local_scan = 10000
|
||||
interval_ms_downloading_scan = 1000
|
||||
extract_path = /seedsynctmp
|
||||
use_local_path_as_extract_path = True
|
||||
|
||||
[Web]
|
||||
port = 8803
|
||||
|
||||
[AutoQueue]
|
||||
enabled = True
|
||||
patterns_only = False
|
||||
auto_extract = False
|
||||
|
||||
35
seedsync/config/seedsync_tv/settings.cfg
Normal file
35
seedsync/config/seedsync_tv/settings.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
[General]
|
||||
debug = False
|
||||
verbose = False
|
||||
|
||||
[Lftp]
|
||||
remote_address = asia.feralhosting.com
|
||||
remote_username = tinyturtle
|
||||
remote_password = password
|
||||
remote_port = 22
|
||||
remote_path = /media/dmg/tinyturtle/transfer/tv
|
||||
local_path = /downloads
|
||||
remote_path_to_scan_script = /media/dmg/tinyturtle/.seedsync_tv_bin
|
||||
use_ssh_key = True
|
||||
num_max_parallel_downloads = 1
|
||||
num_max_parallel_files_per_download = 2
|
||||
num_max_connections_per_root_file = 4
|
||||
num_max_connections_per_dir_file = 4
|
||||
num_max_total_connections = 4
|
||||
use_temp_file = True
|
||||
|
||||
[Controller]
|
||||
interval_ms_remote_scan = 30000
|
||||
interval_ms_local_scan = 10000
|
||||
interval_ms_downloading_scan = 1000
|
||||
extract_path = /seedsynctmp
|
||||
use_local_path_as_extract_path = True
|
||||
|
||||
[Web]
|
||||
port = 8800
|
||||
|
||||
[AutoQueue]
|
||||
enabled = True
|
||||
patterns_only = False
|
||||
auto_extract = True
|
||||
|
||||
68
seedsync/docker-compose.yml
Normal file
68
seedsync/docker-compose.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
name: seedsync
|
||||
services:
|
||||
junksync:
|
||||
image: ipsingh06/seedsync:latest
|
||||
container_name: junksync
|
||||
user: '998'
|
||||
ports:
|
||||
- 8802:8802
|
||||
volumes:
|
||||
- /media/junk/new_transfer:/downloads
|
||||
- ./config/seedsync_junk:/config
|
||||
- /home/media/.ssh:/home/seedsync/.ssh
|
||||
restart: unless-stopped
|
||||
junkpacksync:
|
||||
image: ipsingh06/seedsync:latest
|
||||
container_name: junkpacksync
|
||||
user: '998'
|
||||
ports:
|
||||
- 8804:8804
|
||||
volumes:
|
||||
- /media/raid/junk_pack_transfer:/downloads
|
||||
- ./config/seedsync_junk_packs:/config
|
||||
- /home/media/.ssh:/home/seedsync/.ssh
|
||||
restart: unless-stopped
|
||||
junkmoviesync:
|
||||
image: ipsingh06/seedsync:latest
|
||||
container_name: junkmoviesync
|
||||
user: '998'
|
||||
ports:
|
||||
- 8805:8805
|
||||
volumes:
|
||||
- /media/raid/junk_movies_transfer:/downloads
|
||||
- ./config/seedsync_junk_movies:/config
|
||||
- /home/media/.ssh:/home/seedsync/.ssh
|
||||
restart: unless-stopped
|
||||
moviesync:
|
||||
image: ipsingh06/seedsync:latest
|
||||
container_name: moviesync
|
||||
user: '998'
|
||||
ports:
|
||||
- 8801:8801
|
||||
volumes:
|
||||
- /media/downloads/movies:/downloads
|
||||
- ./config/seedsync_movies:/config
|
||||
- /home/media/.ssh:/home/seedsync/.ssh
|
||||
restart: unless-stopped
|
||||
tvsync:
|
||||
image: ipsingh06/seedsync:latest
|
||||
container_name: tvsync
|
||||
user: '998'
|
||||
ports:
|
||||
- 8800:8800
|
||||
volumes:
|
||||
- /media/downloads/tv:/downloads
|
||||
- ./config/seedsync_tv:/config
|
||||
- /home/media/.ssh:/home/seedsync/.ssh
|
||||
restart: unless-stopped
|
||||
othersync:
|
||||
image: ipsingh06/seedsync:latest
|
||||
container_name: othersync
|
||||
user: '998'
|
||||
ports:
|
||||
- 8803:8803
|
||||
volumes:
|
||||
- /media/downloads/other:/downloads
|
||||
- ./config/seedsync_other:/config
|
||||
- /home/media/.ssh:/home/seedsync/.ssh
|
||||
restart: unless-stopped
|
||||
@@ -138,16 +138,16 @@ plugins:
|
||||
zwGraylist: /data,/movies,/packs
|
||||
zxBlacklist: ""
|
||||
zySwapBetterBitRate: true
|
||||
zySwapBetterFrameRate: true
|
||||
zySwapBetterFrameRate: false
|
||||
zySwapCodec: true
|
||||
zySwapHighRes: true
|
||||
zySwapLongLength: true
|
||||
zzDebug: true
|
||||
zzObsoleteSettingsCheckVer2: true
|
||||
zzTracing: true
|
||||
zzdryRun: true
|
||||
zzdryRun: false
|
||||
PerformerDetailsExtended:
|
||||
additionalStyling: true
|
||||
additionalStyling: false
|
||||
appearsMostWithGendered: true
|
||||
scenesTimespanReverse: false
|
||||
showWhenCollapsed: true
|
||||
@@ -172,12 +172,15 @@ plugins:
|
||||
timestampTrade:
|
||||
addTimestampTradeUrl: true
|
||||
addTsTradeTag: true
|
||||
createGalleryFromScene: false
|
||||
createMarkers: true
|
||||
createMovieFromScene: true
|
||||
disableGalleryLookupHook: true
|
||||
disableSceneMarkersHook: true
|
||||
disableSceneMarkersHook: false
|
||||
extraUrls: true
|
||||
matchFunscripts: false
|
||||
mergeMarkers: true
|
||||
overwriteMarkers: false
|
||||
plugins_path: /plugins/
|
||||
port: 9999
|
||||
preview_audio: true
|
||||
@@ -352,7 +355,7 @@ ui:
|
||||
https://theporndb.net/graphql: []
|
||||
markSceneAsOrganizedOnSave: false
|
||||
mode: auto
|
||||
selectedEndpoint: https://stashdb.org/graphql
|
||||
selectedEndpoint: https://theporndb.net/graphql
|
||||
setCoverImage: true
|
||||
setTags: true
|
||||
showMales: true
|
||||
@@ -374,7 +377,7 @@ ui:
|
||||
interactiveHeatmapsSpeeds: false
|
||||
markerImagePreviews: false
|
||||
markerScreenshots: false
|
||||
markers: false
|
||||
markers: true
|
||||
phashes: true
|
||||
previewOptions:
|
||||
previewExcludeEnd: "0"
|
||||
|
||||
@@ -10,13 +10,6 @@ services:
|
||||
- proxy-net
|
||||
expose:
|
||||
- "9999"
|
||||
## If you intend to use stash's DLNA functionality uncomment the below network mode and comment out the above ports section
|
||||
# network_mode: host
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-file: "10"
|
||||
max-size: "2m"
|
||||
environment:
|
||||
- STASH_STASH=/data/
|
||||
- STASH_GENERATED=/generated/
|
||||
@@ -54,6 +47,10 @@ services:
|
||||
## Custom DupFileManager plugin
|
||||
- /code/Axter-Stash-Gitea/plugins/DupFileManager:/plugins/community/DupFileManager
|
||||
- /code/Axter-Stash-Gitea/plugins/DupFileManager/web:/custom_web
|
||||
## Custom TimestampTrade plugin
|
||||
- /code/Stash-CommunityScripts/plugins/timestampTrade:/plugins/timestampTrade
|
||||
## Custom RemoveMarkers plugin
|
||||
- /code/Stash-Plugins/RemoveMarkers:/plugins/RemoveMarkers
|
||||
## Where to store generated content (screenshots,previews,transcodes,sprites)
|
||||
- /media/stashapp/generated:/generated
|
||||
|
||||
|
||||
Reference in New Issue
Block a user