diff --git a/organizr/CHANGELOG.md b/organizr/CHANGELOG.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/organizr/CHANGELOG.md @@ -0,0 +1 @@ + diff --git a/organizr/Dockerfile b/organizr/Dockerfile new file mode 100644 index 000000000..d5b547900 --- /dev/null +++ b/organizr/Dockerfile @@ -0,0 +1,38 @@ +ARG BUILD_FROM +ARG BUILD_VERSION +FROM ${BUILD_FROM} +ARG BASHIO_VERSION=0.13.0 + +RUN \ + ################### + # Install bashio # + ################## + && mkdir -p /tmp/bashio \ + && curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ + | tar -xzf - --strip 1 -C /tmp/bashio \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -rf /tmp/bashio \ + \ + ######################################## + # Correct upstream image folders links # + ######################################## + \ + # Allow UID and GID setting + && sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ + && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \ + && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser + \ + # Allow custom config folder + #&& sed -i 's=/config=/config/organizr=g' /etc/cont-init.d/10-adduser \ + #&& sed -i 's=/config=/config/organizr=g' /etc/cont-init.d/20-config \ + #&& sed -i 's=/config=/config/organizr=g' /etc/cont-init.d/30-setup \ + #&& sed -i 's=/config=/config/organizr=g' /etc/cont-init.d/40-install \ + #&& sed -i 's=/config=/config/organizr=g' /etc/logrotate.d/nginx \ + #&& sed -i 's=/config=/config/organizr=g' /etc/logrotate.d/php_ftm7 \ + #&& sed -i 's=/config=/config/organizr=g' /etc/services.d/nginx/run \ + #&& sed -i 's=/config=/config/organizr=g' /etc/services.d/nginx/run \ + + +# copy local files +COPY root/ / diff --git a/organizr/README.md b/organizr/README.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/organizr/README.md @@ -0,0 +1 @@ + diff --git a/organizr/apparmor.txt b/organizr/apparmor.txt new file mode 100644 index 000000000..a88500cf3 --- /dev/null +++ b/organizr/apparmor.txt @@ -0,0 +1,39 @@ +#include + +profile organizr_addon flags=(attach_disconnected,mediate_deleted) { + #include + + capability, + file, + mount, + umount, + remount, + + capability setgid, + capability setuid, + + +# S6-Overlay + /bin/** ix, + /usr/bin/** ix, + /usr/lib/bashio/** ix, + /etc/s6/** rix, + /run/s6/** rix, + /etc/services.d/** rwix, + /etc/cont-init.d/** rwix, + /etc/cont-finish.d/** rwix, + /init rix, + /var/run/** mrwkl, + /var/run/ mrwkl, + /dev/i2c-1 mrwkl, + + # Data access + /data/** rw, + + # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container + ptrace (trace,read) peer=docker-default, + + # docker daemon confinement requires explict allow rule for signal + signal (receive) set=(kill,term) peer=/usr/bin/docker, + +} diff --git a/organizr/build.json b/organizr/build.json new file mode 100644 index 000000000..bae4d212b --- /dev/null +++ b/organizr/build.json @@ -0,0 +1,8 @@ +{ + "build_from": { + "armhf": "linuxserver/organizr:linux-arm-v7", + "armv7": "linuxserver/organizr:linux-arm-v7-", + "aarch64": "linuxserver/organizr:linux-arm64", + "amd64": "linuxserver/organizr:linux-amd64" + } +} diff --git a/organizr/config.json b/organizr/config.json new file mode 100644 index 000000000..32cb3809a --- /dev/null +++ b/organizr/config.json @@ -0,0 +1,34 @@ +{ + "name": "Organizr", + "version": "1.90", + "upstream": "1.90", + "slug": "organizr", + "description": "An HTPC/Homelab services organizer that is written in PHP", + "url": "https://github.com/alexbelgium/hassio-addons", + "startup": "services", + "arch": [ + "aarch64", + "amd64", + "armv7", + "armhf" + ], + "ports": { + "80/tcp": 88 + }, + "ports_description": { + "80/tcp": "web interface" + }, + "map": [ + "ssl" + ], + "webui": "http://[HOST]:[PORT:80]", + "boot": "auto", + "environment": { + "PUID": "0", + "PGID": "0" + }, + "options": { + }, + "schema": { + } +} diff --git a/organizr/icon.png b/organizr/icon.png new file mode 100644 index 000000000..fa6102b60 Binary files /dev/null and b/organizr/icon.png differ diff --git a/organizr/logo.png b/organizr/logo.png new file mode 100644 index 000000000..fa6102b60 Binary files /dev/null and b/organizr/logo.png differ diff --git a/organizr/root/etc/cont-init.d/00-banner.sh b/organizr/root/etc/cont-init.d/00-banner.sh new file mode 100644 index 000000000..6fa384d5c --- /dev/null +++ b/organizr/root/etc/cont-init.d/00-banner.sh @@ -0,0 +1,39 @@ +#!/usr/bin/with-contenv bashio +# ============================================================================== +# Home Assistant Community Add-on: Base Images +# Displays a simple add-on banner on startup +# ============================================================================== +if bashio::supervisor.ping; then + bashio::log.blue \ + '-----------------------------------------------------------' + bashio::log.blue " Add-on: $(bashio::addon.name)" + bashio::log.blue " $(bashio::addon.description)" + bashio::log.blue \ + '-----------------------------------------------------------' + + bashio::log.blue " Add-on version: $(bashio::addon.version)" + if bashio::var.true "$(bashio::addon.update_available)"; then + bashio::log.magenta ' There is an update available for this add-on!' + bashio::log.magenta \ + " Latest add-on version: $(bashio::addon.version_latest)" + bashio::log.magenta ' Please consider upgrading as soon as possible.' + else + bashio::log.green ' You are running the latest version of this add-on.' + fi + + bashio::log.blue " System: $(bashio::info.operating_system)" \ + " ($(bashio::info.arch) / $(bashio::info.machine))" + bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)" + bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)" + + bashio::log.blue \ + '-----------------------------------------------------------' + bashio::log.blue \ + ' Please, share the above information when looking for help' + bashio::log.blue \ + ' or support in, e.g., GitHub, forums or the Discord chat.' + bashio::log.blue \ + ' https://github.com/alexbelgium/hassio-addons' + bashio::log.blue \ + '-----------------------------------------------------------' +fi diff --git a/organizr/root/etc/cont-init.d/00-ha-env b/organizr/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/organizr/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/organizr/root/etc/cont-init.d/20-folders b/organizr/root/etc/cont-init.d/20-folders new file mode 100644 index 000000000..a40d5c92e --- /dev/null +++ b/organizr/root/etc/cont-init.d/20-folders @@ -0,0 +1,7 @@ +#!/usr/bin/with-contenv bash + +if [ ! -d /config/prowlarr ]; then + echo "Creating /config/radarr" + mkdir -p /config/prowlarr + chown -R abc:abc /config/prowlarr +fi