Skip to content

Commit 57595d9

Browse files
committed
tdarr initial build
1 parent a2ecc71 commit 57595d9

File tree

12 files changed

+388
-2
lines changed

12 files changed

+388
-2
lines changed

.github/paths-filter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ fireflyiii_fints_importer: fireflyiii_fints_importer/config.*
99
plex_meta_manager: plex_meta_manager/config.*
1010
scrutiny_fa: scrutiny_fa/config.*
1111
spotweb: spotweb/config.*
12+
tdarr: tdarr/config.*
1213
webtop: webtop/config.*
1314
webtop_kde: webtop_kde/config.*
1415
zoneminder: zoneminder/config.*
15-
1616
#################
1717
# MANUAL BUILDS #
1818
#################
@@ -64,4 +64,4 @@ zoneminder: zoneminder/config.*
6464
#webtrees: webtrees/config.*
6565
#wger: wger/config.*
6666
#whoogle-search: whoogle-search/config.*
67-
#xteve: xteve/config.*
67+
#xteve: xteve/config.*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ https://github.com/alexbelgium/hassio-addons
9595
- [Portainer](portainer/) ![privileged][privileged-shield] ![ingress][ingress-shield] : Manage your docker environment
9696
- [Scrutiny](scrutiny/) ![support][support-shield] ![ingress][ingress-shield]: Scrutiny WebUI for smartd S.M.A.R.T monitoring
9797
- [Spotweb](spotweb/) : Spotweb is a decentralized usenet community based on the Spotnet protocol
98+
- [Tdarr](tdarr/): Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking
9899
- [Teamspeak](teamspeak/): Voice communication for online gaming, education and training.
99100

100101
### ✓ Multimedia distributors

tdarr/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 2.00.16.3 (24-03-2022)
2+
3+
- Update to latest version from haveagitgat/tdarr
4+
- Initial build

tdarr/Dockerfile

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#============================#
2+
# ALEXBELGIUM'S DOCKERFILE #
3+
#============================#
4+
# _.------.
5+
# _.-` ('>.-`"""-.
6+
# '.--'` _'` _ .--.)
7+
# -' '-.-';` `
8+
# ' - _.' ``'--.
9+
# '---` .-'""`
10+
# /`
11+
#=== Home Assistant Addon ===#
12+
13+
#################
14+
# 1 Build Image #
15+
#################
16+
17+
ARG BUILD_FROM
18+
ARG BUILD_VERSION
19+
FROM ${BUILD_FROM}
20+
21+
##################
22+
# 2 Modify Image #
23+
##################
24+
25+
##################
26+
# 3 Install apps #
27+
##################
28+
29+
# Add rootfs
30+
COPY rootfs/ /
31+
32+
# Modules
33+
ARG MODULES="00-banner.sh 92-local_mounts.sh 92-smb_mounts.sh"
34+
35+
# Automatic modules download
36+
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
37+
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
38+
&& mkdir -p /etc/cont-init.d \
39+
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
40+
&& chmod -R 755 /etc/cont-init.d || printf '%s\n' "${MODULES}" >/MODULESFILE
41+
42+
# Manual apps
43+
ENV PACKAGES="libgles2-mesa libgles2-mesa-dev xorg-dev"
44+
45+
# Automatic apps & bashio
46+
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
47+
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
48+
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
49+
&& chmod 777 /automatic_packages.sh \
50+
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
51+
&& rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
52+
53+
################
54+
# 4 Entrypoint #
55+
################
56+
57+
############
58+
# 5 Labels #
59+
############
60+
61+
ARG BUILD_ARCH
62+
ARG BUILD_DATE
63+
ARG BUILD_DESCRIPTION
64+
ARG BUILD_NAME
65+
ARG BUILD_REF
66+
ARG BUILD_REPOSITORY
67+
ARG BUILD_VERSION
68+
LABEL \
69+
io.hass.name="${BUILD_NAME}" \
70+
io.hass.description="${BUILD_DESCRIPTION}" \
71+
io.hass.arch="${BUILD_ARCH}" \
72+
io.hass.type="addon" \
73+
io.hass.version=${BUILD_VERSION} \
74+
maintainer="alexbelgium (https://github.com/alexbelgium)" \
75+
org.opencontainers.image.title="${BUILD_NAME}" \
76+
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
77+
org.opencontainers.image.vendor="Home Assistant Add-ons" \
78+
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
79+
org.opencontainers.image.licenses="MIT" \
80+
org.opencontainers.image.url="https://github.com/alexbelgium" \
81+
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
82+
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
83+
org.opencontainers.image.created=${BUILD_DATE} \
84+
org.opencontainers.image.revision=${BUILD_REF} \
85+
org.opencontainers.image.version=${BUILD_VERSION}

tdarr/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Home assistant add-on: Tdarr
2+
3+
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
4+
5+
![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2FTdarr%2Fconfig.json)
6+
![Ingress](https://img.shields.io/badge/dynamic/json?label=Ingress&query=%24.ingress&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2FTdarr%2Fconfig.json)
7+
![Arch](https://img.shields.io/badge/dynamic/json?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2FTdarr%2Fconfig.json)
8+
9+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9c6cf10bdbba45ecb202d7f579b5be0e)](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade)
10+
[![GitHub Super-Linter](https://github.com/alexbelgium/hassio-addons/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
11+
[![Builder](https://github.com/alexbelgium/hassio-addons/workflows/Builder/badge.svg)](https://github.com/alexbelgium/hassio-addons/actions/workflows/builder.yaml)
12+
13+
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
14+
15+
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
16+
17+
[![Stargazers repo roster for @alexbelgium/hassio-addons](https://reporoster.com/stars/alexbelgium/hassio-addons)](https://github.com/alexbelgium/hassio-addons/stargazers)
18+
19+
## About
20+
21+
[Tdarr](https://tdarr.io) is a closed-source distributed transcoding system for automating media library transcode/remux management and making sure your files are exactly how you need them to be in terms of codecs/streams/containers and so on. Put your spare hardware to use with Tdarr Nodes for Windows, Linux (including Linux arm) and macOS.
22+
23+
This addon is based on the [docker image](https://hub.docker.com/r/hurlenko/Tdarr) from hurlenko.
24+
25+
## Configuration
26+
27+
Webui can be found at <http://your-ip:8265>.
28+
App documentation can be found here : https://docs.tdarr.io/docs/welcome/what/
29+
30+
```yaml
31+
localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS...
32+
networkdisks: "//SERVER/SHARE" # optional, list of smbv2/3 servers to mount, separated by commas
33+
cifsusername: "username" # optional, smb username, same for all smb shares
34+
cifspassword: "password" # optional, smb password, same for all smb shares)
35+
```
36+
37+
## Installation
38+
39+
The installation of this add-on is pretty straightforward and not different in
40+
comparison to installing any other Hass.io add-on.
41+
42+
1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance.
43+
1. Install this add-on.
44+
1. Click the `Save` button to store your configuration.
45+
1. Start the add-on.
46+
1. Check the logs of the add-on to see if everything went well.
47+
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
48+
49+
## Support
50+
51+
Create an issue on github, or ask on the [home assistant thread](https://community.home-assistant.io/t/home-assistant-addon-Tdarr/282108/3)
52+
53+
[repository]: https://github.com/alexbelgium/hassio-addons
54+
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
55+
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
56+
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg

tdarr/apparmor.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#include <tunables/global>
2+
3+
profile db21ed7f_tdarr flags=(attach_disconnected,mediate_deleted) {
4+
#include <abstractions/base>
5+
6+
capability,
7+
file,
8+
signal,
9+
mount,
10+
umount,
11+
remount,
12+
network udp,
13+
network tcp,
14+
network dgram,
15+
network stream,
16+
network inet,
17+
network inet6,
18+
network netlink raw,
19+
20+
capability setgid,
21+
capability setuid,
22+
capability sys_admin,
23+
capability dac_read_search,
24+
# capability dac_override,
25+
# capability sys_rawio,
26+
27+
# S6-Overlay
28+
/bin/** ix,
29+
/usr/bin/** ix,
30+
/usr/lib/bashio/** ix,
31+
/etc/s6/** rix,
32+
/run/s6/** rix,
33+
/etc/services.d/** rwix,
34+
/etc/cont-init.d/** rwix,
35+
/etc/cont-finish.d/** rwix,
36+
/init rix,
37+
/var/run/** mrwkl,
38+
/var/run/ mrwkl,
39+
/dev/i2c-1 mrwkl,
40+
# Files required
41+
/dev/sda1 mrwkl,
42+
/dev/sdb1 mrwkl,
43+
/dev/mmcblk0p1 mrwkl,
44+
/dev/* mrwkl,
45+
/tmp/** mrkwl,
46+
47+
# Data access
48+
/data/** rw,
49+
50+
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
51+
ptrace (trace,read) peer=docker-default,
52+
53+
# docker daemon confinement requires explict allow rule for signal
54+
signal (receive) set=(kill,term) peer=/usr/bin/docker,
55+
56+
}

tdarr/build.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"build_from": {
3+
"aarch64": "ghcr.io/haveagitgat/tdarr:latest",
4+
"amd64": "ghcr.io/haveagitgat/tdarr:latest",
5+
"armv7": "ghcr.io/haveagitgat/tdarr:latest"
6+
},
7+
"codenotary": {
8+
"signer": "alexandrep.github@gmail.com"
9+
}
10+
}

tdarr/config.json

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"apparmor": true,
3+
"arch": ["aarch64", "amd64", "armv7"],
4+
"backup_exclude": [
5+
"*/cache/",
6+
"*/logs/",
7+
"*/transcoding-temp/",
8+
"*/metadata/"
9+
],
10+
"description": "Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking",
11+
"devices": [
12+
"/dev/sda",
13+
"/dev/sdb",
14+
"/dev/sdc",
15+
"/dev/sdd",
16+
"/dev/sde",
17+
"/dev/sdf",
18+
"/dev/sdg",
19+
"/dev/nvme",
20+
"/dev/mmcblk",
21+
"/dev/sda1",
22+
"/dev/sdb1",
23+
"/dev/sdc1",
24+
"/dev/sdd1",
25+
"/dev/sde1",
26+
"/dev/sdf1",
27+
"/dev/sdg1",
28+
"/dev/sda2",
29+
"/dev/sdb2",
30+
"/dev/sdc2",
31+
"/dev/sdd2",
32+
"/dev/sde2",
33+
"/dev/sdf2",
34+
"/dev/sdg2",
35+
"/dev/sda3",
36+
"/dev/sdb3",
37+
"/dev/sda4",
38+
"/dev/sdb4",
39+
"/dev/nvme0",
40+
"/dev/nvme1",
41+
"/dev/nvme2"
42+
],
43+
"environment": {
44+
"serverIP": "0.0.0.0",
45+
"serverPort": "8266",
46+
"webUIPort": "8265",
47+
"internalNode": "true",
48+
"nodeID": "MyInternalNode",
49+
"nodeIP": "0.0.0.0",
50+
"nodePort": "8267",
51+
"TZ": "Europe/London",
52+
"PUID": "0",
53+
"PGID": "0",
54+
"NVIDIA_DRIVER_CAPABILITIES": "all",
55+
"NVIDIA_VISIBLE_DEVICES": "all"
56+
},
57+
"host_dbus": true,
58+
"image": "ghcr.io/alexbelgium/tdarr-{arch}",
59+
"map": [
60+
"media:rw",
61+
"config:rw",
62+
"addons:rw",
63+
"backup:rw",
64+
"share:rw",
65+
"ssl:rw"
66+
],
67+
"name": "Tdarr",
68+
"options": {
69+
"CONFIG_LOCATION": "/config/addons_config/tdarr"
70+
},
71+
"panel_icon": "mdi:file-search",
72+
"ports": {
73+
"8265/tcp": 8265,
74+
"8266/tcp": 8266
75+
},
76+
"ports_description": {
77+
"8265/tcp": "Web UI port",
78+
"8266/tcp": "Server Port"
79+
},
80+
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
81+
"schema": {
82+
"CONFIG_LOCATION": "str",
83+
"TZ": "str?",
84+
"cifsdomain": "str?",
85+
"cifspassword": "str?",
86+
"cifsusername": "str?",
87+
"localdisks": "str?",
88+
"networkdisks": "str?"
89+
},
90+
"slug": "tdarr",
91+
"upstream": "2.00.16.3",
92+
"url": "https://github.com/alexbelgium/hassio-addons",
93+
"codenotary": "alexandrep.github@gmail.com",
94+
"version": "2.00.16.3",
95+
"video": true,
96+
"webui": "[PROTO:ssl]://[HOST]:[PORT:8265]"
97+
}

tdarr/icon.png

239 KB
Loading

tdarr/logo.png

239 KB
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# If dockerfile failed install manually
4+
5+
##############################
6+
# Automatic modules download #
7+
##############################
8+
if [ -e "/MODULESFILE" ]; then
9+
MODULES=$(</MODULESFILE)
10+
MODULES="${MODULES:-00-banner.sh}"
11+
echo "Executing modules script : $MODULES"
12+
13+
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
14+
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
15+
&& mkdir -p /etc/cont-init.d \
16+
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
17+
&& chmod -R 755 /etc/cont-init.d
18+
fi
19+
20+
#######################
21+
# Automatic installer #
22+
#######################
23+
if [ -e "/ENVFILE" ]; then
24+
PACKAGES=$(</ENVFILE)
25+
echo "Executing dependency script with custom elements : $PACKAGES"
26+
27+
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
28+
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
29+
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
30+
&& chmod 777 /automatic_packages.sh \
31+
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
32+
&& rm /automatic_packages.sh
33+
fi

0 commit comments

Comments
 (0)