This commit is contained in:
2023-09-26 18:14:36 -06:00
commit fb5a0fc542
443 changed files with 21892 additions and 0 deletions

110
Tdarr/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: Tdarr
URL: tdarr.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for Tdarr failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for Tdarr failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Tdarr succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for Tdarr failed.
when:
status:
- failure

7
Tdarr/.env Normal file
View File

@@ -0,0 +1,7 @@
TZ=America/Denver
PUID=1000
PGID=1000
UMASK_SET=2
serverIP=172.20.0.2
serverPort=8266
webUIPort=8265

3
Tdarr/.node.a.env Normal file
View File

@@ -0,0 +1,3 @@
nodeID=NodeA
nodeIP=172.20.0.3
nodePort=8267

View File

@@ -0,0 +1,18 @@
{
"nodeID": "NodeA",
"serverIP": "172.20.0.2",
"serverPort": "8266",
"handbrakePath": "",
"ffmpegPath": "",
"mkvpropeditPath": "",
"pathTranslators": [
{
"server": "",
"node": ""
}
],
"platform_arch": "linux_x64_docker_true",
"logLevel": "INFO",
"nodeIP": "172.20.0.3",
"nodePort": "8267"
}

View File

@@ -0,0 +1,8 @@
{
"serverPort": "8266",
"webUIPort": "8265",
"serverIP": "172.20.0.2",
"handbrakePath": "",
"ffmpegPath": "",
"logLevel": "INFO"
}

3
Tdarr/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Tdarr
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/Tdarr/status.svg)](https://drone.alexlebens.net/alexlebens/Tdarr)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Tdarr - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://tdarr.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "tdarr",
"docker_host": 1
}

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "Tdarr Node A - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://tdarr.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "tdarr_node_a",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "Tdarr - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://tdarr.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

115
Tdarr/docker-compose.yml Normal file
View File

@@ -0,0 +1,115 @@
services:
tdarr:
container_name: tdarr
env_file:
- .env
image: haveagitgat/tdarr:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.tdarr.entrypoints: websecure
traefik.http.routers.tdarr.rule: Host(`tdarr.alexlebens.net`)
traefik.http.routers.tdarr.service: tdarr
traefik.http.routers.tdarr.middlewares: authentik@file
traefik.http.services.tdarr.loadbalancer.server.port: 8265
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
tdarr:
ipv4_address: 172.20.0.2
traefik: null
privileged: true
restart: always
volumes:
- server:/app/server
- logs:/app/logs
- media:/media
- cache:/temp
- storage_nfs:/mnt/store
- config:/app/configs
tdarr_node:
container_name: tdarr_node_a
cpus: 6
depends_on:
- tdarr
devices:
- /dev/dri:/dev/dri
env_file:
- .env
- .node.a.env
image: haveagitgat/tdarr_node:latest
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
tdarr:
ipv4_address: 172.20.0.3
privileged: true
restart: always
volumes:
- logs:/app/logs
- media:/media
- cache:/temp
- storage_nfs:/mnt/store
- config:/app/configs
networks:
traefik:
name: traefik
external: true
tdarr:
name: tdarr
external: false
ipam:
config:
- subnet: 172.20.0.0/16
volumes:
server:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/tdarr_server
logs:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/tdarr_logs
media:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/tdarr_media
cache:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/tdarr_cache
config:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/tdarr_config
storage_nfs:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.194,nfsvers=4
device: :/volume2/Storage