diff --git a/transmission_nas/DOCS.md b/transmission/DOCS.md similarity index 100% rename from transmission_nas/DOCS.md rename to transmission/DOCS.md diff --git a/transmission/Dockerfile b/transmission/Dockerfile index 71ae68fc3..12187699c 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -1,6 +1,59 @@ -FROM linuxserver/transmission +ARG BUILD_FROM=hassioaddons/base:8.0.1 +# hadolint ignore=DL3006 +FROM ${BUILD_FROM} -# MOFIFY DATA PATH -RUN sed -i "s|config|data|g" /etc/services.d/transmission/run +# Copy root filesystem +COPY rootfs / -VOLUME [ "/data" ] \ No newline at end of file +# Setup base +RUN apk add --no-cache \ + coreutils \ + nginx \ + transmission-daemon \ + openvpn +# Small hack needed for ingress support +# +# Transmission always uses "transmission" as a subdirectory in the URL, so the web interface can for instance be found at: +# +# http:///transmission/web/ +# +# The same goes for the RPC API, which is exposed under /transmission/rpc. When using ingress, this is not the case however +# and "transmission" directory is not part of the URL. So transmission is basically served under the root (/), e.g.: +# +# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/ +# +# As the web UI uses a relative path when resolving the RPC endpoint, it basically becomes: +# +# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/../rpc +# +# which obviously is: +# +# http://10.0.10.110:8123/api/hassio_ingress +# +# This will not work. The sed statement below changes the way the RPC endpoint is determined by keeping the regular endpoint +# when accessing transmission as usual, but stripping the relative part when using ingress. +RUN sed -i 's|'"'"'\.\./rpc'"'"'|window.location.pathname.endsWith("/web/") ? "../rpc" : "rpc"|' /usr/share/transmission/web/javascript/remote.js + +# Build arugments +ARG BUILD_ARCH +ARG BUILD_DATE +ARG BUILD_REF +ARG BUILD_VERSION + +# Labels +LABEL \ + io.hass.name="Transmission" \ + io.hass.description="The torrent client for Hass.io with OpenVPN support" \ + io.hass.arch="${BUILD_ARCH}" \ + io.hass.type="addon" \ + io.hass.version=${BUILD_VERSION} \ + maintainer="Pierrick Rouxel " \ + org.label-schema.description="The torrent client for Hass.io" \ + org.label-schema.build-date=${BUILD_DATE} \ + org.label-schema.name="Transmission" \ + org.label-schema.schema-version="1.0" \ + org.label-schema.url="https://github.com/pierrickrouxel" \ + org.label-schema.usage="https://github.com/pierrickrouxel/hassio-addon-transmission/tree/master/README.md" \ + org.label-schema.vcs-ref=${BUILD_REF} \ + org.label-schema.vcs-url="https://github.com/pierrickrouxel" \ + org.label-schema.vendor="Community Hass.io Addons" diff --git a/transmission/README.md b/transmission/README.md deleted file mode 100644 index 3be887297..000000000 --- a/transmission/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Marcelveldt's Hassio Add-ons: Radarr - -## About - -Radarr add-on based on the prebuilt docker image from linuxserver -Radarr - A fork of Sonarr to work with movies à la Couchpotato. - -## Installation - -The installation of this add-on is pretty straightforward and not different in -comparison to installing any other Hass.io add-on. - -1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance. -1. Install this add-on. -1. Click the `Save` button to store your configuration. -1. Start the add-on. -1. Check the logs of the add-on to see if everything went well. -1. Carefully configure the add-on to your preferences, see the official documentation for for that. - - -## Configuration - -Webui can be found at :7878 - -By default hassio folders backup, share and ssl are available within the addon. -You can use the share folder to access/store your media files. - -Documentation for Radarr: https://github.com/Radarr/Radarr - - - -[repository]: https://github.com/marcelveldt/hassio-addons-repo \ No newline at end of file diff --git a/transmission_nas/build.json b/transmission/build.json similarity index 100% rename from transmission_nas/build.json rename to transmission/build.json diff --git a/transmission/config.json b/transmission/config.json index c722c26e4..ffdb01fe0 100644 --- a/transmission/config.json +++ b/transmission/config.json @@ -1,39 +1,65 @@ { - "name": "Transmission without vpn", - "version": "latest", - "slug": "transmission_docker", - "description": "The torrent client for Hass.io with OpenVPN support", - "url": "https://github.com/alexbelgium/hassio-addons", - "startup": "services", - "arch": [ - "aarch64", - "amd64", - "armv7", - "armhf" - ], - "ports": { - "9091/tcp": 9091, + "name": "Transmission with NAS", + "version": "1.0", + "slug": "transmission", + "description": "The torrent client for Hass.io with OpenVPN support", + "url": "https://github.com/pierrickrouxel/hassio-addon-transmission", + "webui": "http://[HOST]:[PORT:9091]/transmission/web/", + "startup": "services", + "ingress": "true", + "ingress_port": 8099, + "panel_icon": "mdi:progress-download", + "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], + "map": [ + "config:rw", + "share:rw", + "ssl" + ], + "boot": "auto", + "ports": { + "9091/tcp": null, "51413/tcp": 51413, "51413/udp": 51413 - }, - "ports_description": { - "9091/tcp": "Web UI port", + }, + "ports_description": { + "9091/tcp": "Web UI port (Not required for Hass.io Ingress)", "51413/tcp": "Peer port (setup port forwarding to this port)", "51413/udp": "Peer port (setup port forwarding to this port)" - }, - "map": [ - "backup:rw", - "share:rw", - "ssl" - ], - "webui": "http://[HOST]:[PORT:9091]/transmission/web/", - "boot": "auto", - "environment": { - "PUID": "0", - "PGID": "0" - }, - "ingress": "true", - "ingress_port": 9091, - "options": {}, - "schema": {} -} \ No newline at end of file + }, + "privileged": [ + "NET_ADMIN" + ], + "devices": [ + "/dev/net/tun:/dev/net/tun:rwm" + ], + "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"], + "full_access": true, + "hassio_api": true, + "homeassistant_api": false, + "host_network": false, + "options": { + "log_level": "info", + "authentication_required": false, + "username": "", + "password": "", + "localdisks": ["-sda1"], + "openvpn_enabled": false, + "openvpn_config": "", + "openvpn_username": "", + "openvpn_password": "" + }, + "schema": { + "log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)", + "authentication_required": "bool", + "username": "str", + "password": "str", + "localdisks": ["str"], + "openvpn_enabled": "bool", + "openvpn_config": "str", + "openvpn_username": "str", + "openvpn_password": "str" + }, + "environment": { + "LOG_FORMAT": "{LEVEL}: {MESSAGE}" + } + } diff --git a/transmission/icon.png b/transmission/icon.png index 5e143b52e..29a6a3cdc 100644 Binary files a/transmission/icon.png and b/transmission/icon.png differ diff --git a/transmission/logo.png b/transmission/logo.png index 5e143b52e..524beb6b2 100644 Binary files a/transmission/logo.png and b/transmission/logo.png differ diff --git a/transmission_nas/rootfs/etc/cont-init.d/10-requirements.sh b/transmission/rootfs/etc/cont-init.d/10-requirements.sh similarity index 100% rename from transmission_nas/rootfs/etc/cont-init.d/10-requirements.sh rename to transmission/rootfs/etc/cont-init.d/10-requirements.sh diff --git a/transmission_nas/rootfs/etc/cont-init.d/20-transmission-configuration.sh b/transmission/rootfs/etc/cont-init.d/20-transmission-configuration.sh similarity index 100% rename from transmission_nas/rootfs/etc/cont-init.d/20-transmission-configuration.sh rename to transmission/rootfs/etc/cont-init.d/20-transmission-configuration.sh diff --git a/transmission_nas/rootfs/etc/cont-init.d/21-openvpn-configuration.sh b/transmission/rootfs/etc/cont-init.d/21-openvpn-configuration.sh similarity index 100% rename from transmission_nas/rootfs/etc/cont-init.d/21-openvpn-configuration.sh rename to transmission/rootfs/etc/cont-init.d/21-openvpn-configuration.sh diff --git a/transmission_nas/rootfs/etc/cont-init.d/30-nginx.sh b/transmission/rootfs/etc/cont-init.d/30-nginx.sh similarity index 100% rename from transmission_nas/rootfs/etc/cont-init.d/30-nginx.sh rename to transmission/rootfs/etc/cont-init.d/30-nginx.sh diff --git a/transmission_nas/rootfs/etc/cont-init.d/50-mounts.sh b/transmission/rootfs/etc/cont-init.d/50-mounts.sh similarity index 100% rename from transmission_nas/rootfs/etc/cont-init.d/50-mounts.sh rename to transmission/rootfs/etc/cont-init.d/50-mounts.sh diff --git a/transmission_nas/rootfs/etc/nginx/includes/mime.types b/transmission/rootfs/etc/nginx/includes/mime.types similarity index 100% rename from transmission_nas/rootfs/etc/nginx/includes/mime.types rename to transmission/rootfs/etc/nginx/includes/mime.types diff --git a/transmission_nas/rootfs/etc/nginx/includes/proxy_params.conf b/transmission/rootfs/etc/nginx/includes/proxy_params.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/includes/proxy_params.conf rename to transmission/rootfs/etc/nginx/includes/proxy_params.conf diff --git a/transmission_nas/rootfs/etc/nginx/includes/resolver.conf b/transmission/rootfs/etc/nginx/includes/resolver.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/includes/resolver.conf rename to transmission/rootfs/etc/nginx/includes/resolver.conf diff --git a/transmission_nas/rootfs/etc/nginx/includes/server_params.conf b/transmission/rootfs/etc/nginx/includes/server_params.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/includes/server_params.conf rename to transmission/rootfs/etc/nginx/includes/server_params.conf diff --git a/transmission_nas/rootfs/etc/nginx/includes/ssl_params.conf b/transmission/rootfs/etc/nginx/includes/ssl_params.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/includes/ssl_params.conf rename to transmission/rootfs/etc/nginx/includes/ssl_params.conf diff --git a/transmission_nas/rootfs/etc/nginx/includes/upstream.conf b/transmission/rootfs/etc/nginx/includes/upstream.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/includes/upstream.conf rename to transmission/rootfs/etc/nginx/includes/upstream.conf diff --git a/transmission_nas/rootfs/etc/nginx/nginx.conf b/transmission/rootfs/etc/nginx/nginx.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/nginx.conf rename to transmission/rootfs/etc/nginx/nginx.conf diff --git a/transmission_nas/rootfs/etc/nginx/servers/ingress.conf b/transmission/rootfs/etc/nginx/servers/ingress.conf similarity index 100% rename from transmission_nas/rootfs/etc/nginx/servers/ingress.conf rename to transmission/rootfs/etc/nginx/servers/ingress.conf diff --git a/transmission_nas/rootfs/etc/openvpn/up-transmission.sh b/transmission/rootfs/etc/openvpn/up-transmission.sh similarity index 100% rename from transmission_nas/rootfs/etc/openvpn/up-transmission.sh rename to transmission/rootfs/etc/openvpn/up-transmission.sh diff --git a/transmission_nas/rootfs/etc/services.d/nginx/finish b/transmission/rootfs/etc/services.d/nginx/finish similarity index 100% rename from transmission_nas/rootfs/etc/services.d/nginx/finish rename to transmission/rootfs/etc/services.d/nginx/finish diff --git a/transmission_nas/rootfs/etc/services.d/nginx/run b/transmission/rootfs/etc/services.d/nginx/run similarity index 100% rename from transmission_nas/rootfs/etc/services.d/nginx/run rename to transmission/rootfs/etc/services.d/nginx/run diff --git a/transmission_nas/rootfs/etc/services.d/transmission/finish b/transmission/rootfs/etc/services.d/transmission/finish similarity index 100% rename from transmission_nas/rootfs/etc/services.d/transmission/finish rename to transmission/rootfs/etc/services.d/transmission/finish diff --git a/transmission_nas/rootfs/etc/services.d/transmission/run b/transmission/rootfs/etc/services.d/transmission/run similarity index 100% rename from transmission_nas/rootfs/etc/services.d/transmission/run rename to transmission/rootfs/etc/services.d/transmission/run diff --git a/transmission_nas/Dockerfile b/transmission_nas/Dockerfile deleted file mode 100644 index 12187699c..000000000 --- a/transmission_nas/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -ARG BUILD_FROM=hassioaddons/base:8.0.1 -# hadolint ignore=DL3006 -FROM ${BUILD_FROM} - -# Copy root filesystem -COPY rootfs / - -# Setup base -RUN apk add --no-cache \ - coreutils \ - nginx \ - transmission-daemon \ - openvpn -# Small hack needed for ingress support -# -# Transmission always uses "transmission" as a subdirectory in the URL, so the web interface can for instance be found at: -# -# http:///transmission/web/ -# -# The same goes for the RPC API, which is exposed under /transmission/rpc. When using ingress, this is not the case however -# and "transmission" directory is not part of the URL. So transmission is basically served under the root (/), e.g.: -# -# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/ -# -# As the web UI uses a relative path when resolving the RPC endpoint, it basically becomes: -# -# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/../rpc -# -# which obviously is: -# -# http://10.0.10.110:8123/api/hassio_ingress -# -# This will not work. The sed statement below changes the way the RPC endpoint is determined by keeping the regular endpoint -# when accessing transmission as usual, but stripping the relative part when using ingress. -RUN sed -i 's|'"'"'\.\./rpc'"'"'|window.location.pathname.endsWith("/web/") ? "../rpc" : "rpc"|' /usr/share/transmission/web/javascript/remote.js - -# Build arugments -ARG BUILD_ARCH -ARG BUILD_DATE -ARG BUILD_REF -ARG BUILD_VERSION - -# Labels -LABEL \ - io.hass.name="Transmission" \ - io.hass.description="The torrent client for Hass.io with OpenVPN support" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.type="addon" \ - io.hass.version=${BUILD_VERSION} \ - maintainer="Pierrick Rouxel " \ - org.label-schema.description="The torrent client for Hass.io" \ - org.label-schema.build-date=${BUILD_DATE} \ - org.label-schema.name="Transmission" \ - org.label-schema.schema-version="1.0" \ - org.label-schema.url="https://github.com/pierrickrouxel" \ - org.label-schema.usage="https://github.com/pierrickrouxel/hassio-addon-transmission/tree/master/README.md" \ - org.label-schema.vcs-ref=${BUILD_REF} \ - org.label-schema.vcs-url="https://github.com/pierrickrouxel" \ - org.label-schema.vendor="Community Hass.io Addons" diff --git a/transmission_nas/config.json b/transmission_nas/config.json deleted file mode 100644 index b2754d145..000000000 --- a/transmission_nas/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "Transmission with NAS", - "version": "1.0", - "slug": "transmission_nas", - "description": "The torrent client for Hass.io with OpenVPN support", - "url": "https://github.com/pierrickrouxel/hassio-addon-transmission", - "webui": "http://[HOST]:[PORT:9091]/transmission/web/", - "startup": "services", - "ingress": "true", - "ingress_port": 8099, - "panel_icon": "mdi:progress-download", - "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], - "map": [ - "config:rw", - "share:rw", - "ssl" - ], - "boot": "auto", - "ports": { - "9091/tcp": null, - "51413/tcp": 51413, - "51413/udp": 51413 - }, - "ports_description": { - "9091/tcp": "Web UI port (Not required for Hass.io Ingress)", - "51413/tcp": "Peer port (setup port forwarding to this port)", - "51413/udp": "Peer port (setup port forwarding to this port)" - }, - "privileged": [ - "NET_ADMIN" - ], - "devices": [ - "/dev/net/tun:/dev/net/tun:rwm" - ], - "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"], - "full_access": true, - "hassio_api": true, - "homeassistant_api": false, - "host_network": false, - "options": { - "log_level": "info", - "authentication_required": false, - "username": "", - "password": "", - "localdisks": ["-sda1"], - "openvpn_enabled": false, - "openvpn_config": "", - "openvpn_username": "", - "openvpn_password": "" - }, - "schema": { - "log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)", - "authentication_required": "bool", - "username": "str", - "password": "str", - "localdisks": ["str"], - "openvpn_enabled": "bool", - "openvpn_config": "str", - "openvpn_username": "str", - "openvpn_password": "str" - }, - "environment": { - "LOG_FORMAT": "{LEVEL}: {MESSAGE}" - } - } diff --git a/transmission_nas/icon.png b/transmission_nas/icon.png deleted file mode 100644 index 29a6a3cdc..000000000 Binary files a/transmission_nas/icon.png and /dev/null differ diff --git a/transmission_nas/logo.png b/transmission_nas/logo.png deleted file mode 100644 index 524beb6b2..000000000 Binary files a/transmission_nas/logo.png and /dev/null differ