From 33acdc0f44ea0e67c9675417d3115b152625845b Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Thu, 18 Nov 2021 00:32:04 +0100 Subject: [PATCH 01/19] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 101c89bd..db674b02 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,7 +4,7 @@ ## New theme option -- The current variables in use can be found in any of the CSS files in `/css/variables/` +- The current variables in use can be found in any of the CSS files in `/css/theme-options/` and `/css/community-theme-options/` - New community contributed theme options will be placed in the `Community Themes` category on our docs page. From 27d14dc79e821b49905f7fd78a6f626e6eda1734 Mon Sep 17 00:00:00 2001 From: GilbN Date: Fri, 19 Nov 2021 16:33:58 +0100 Subject: [PATCH 02/19] LF > CRLF --- docker-mods/calibre-web/Dockerfile | 12 +-- .../root/etc/cont-init.d/98-themepark | 90 +++++++++---------- docker-mods/jellyfin/Dockerfile | 10 +-- docker-mods/lazylibrarian/Dockerfile | 10 +-- docker-mods/librespeed/Dockerfile | 10 +-- docker-mods/lidarr/Dockerfile | 10 +-- docker-mods/mylar3/Dockerfile | 12 +-- docker-mods/nzbget/Dockerfile | 10 +-- docker-mods/plex/Dockerfile | 12 +-- docker-mods/prowlarr/Dockerfile | 12 +-- docker-mods/qbittorrent/Dockerfile | 12 +-- docker-mods/radarr/Dockerfile | 12 +-- docker-mods/readarr/Dockerfile | 10 +-- docker-mods/rutorrent/Dockerfile | 10 +-- docker-mods/sabnzbd/Dockerfile | 10 +-- docker-mods/sonarr/Dockerfile | 12 +-- docker-mods/synclounge/Dockerfile | 10 +-- docker-mods/tautulli/Dockerfile | 10 +-- docker-mods/thelounge/Dockerfile | 10 +-- docker-mods/transmission/Dockerfile | 10 +-- docker-mods/vuetorrent/Dockerfile | 12 +-- 21 files changed, 153 insertions(+), 153 deletions(-) diff --git a/docker-mods/calibre-web/Dockerfile b/docker-mods/calibre-web/Dockerfile index ce252f78..0a7e59d9 100644 --- a/docker-mods/calibre-web/Dockerfile +++ b/docker-mods/calibre-web/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Calibre-Web" -#copy local files. -COPY root/ / +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Calibre-Web" +#copy local files. +COPY root/ / diff --git a/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark b/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark index a563da09..01b64324 100644 --- a/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark +++ b/docker-mods/calibre-web/root/etc/cont-init.d/98-themepark @@ -1,45 +1,45 @@ -#!/usr/bin/with-contenv bash - -echo '--------------------------------' -echo '| Calibre-web theme.park Mod |' -echo '--------------------------------' - -# Display variables for troubleshooting -echo -e "Variables set:\\n\ -'TP_DOMAIN'=${TP_DOMAIN}\\n\ -'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ -'TP_THEME'=${TP_THEME}\\n" - -# Set default -if [[ -z ${TP_DOMAIN} ]]; then - echo 'No domain set, defaulting to theme-park.dev' - TP_DOMAIN='theme-park.dev' -fi - -THEME_TYPE='theme-options' -if [ "${TP_COMMUNITY_THEME}" = true ]; then - THEME_TYPE='community-theme-options' -fi - -case ${TP_DOMAIN} in - *"github.io"*) - echo "Switching to github.io URL style" - TP_DOMAIN="${TP_DOMAIN}\/theme.park" - ;; -esac - -if [[ -z ${TP_THEME} ]]; then - echo 'No theme set, defaulting to organizr' - TP_THEME='organizr' -fi - -# Adding stylesheets -if ! grep -q "${TP_DOMAIN}/css/base" /app/calibre-web/cps/templates/layout.html; then - echo '---------------------------' - echo '| Adding the stylesheet |' - echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html - sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html - printf 'Stylesheet set to %s\n' "${TP_THEME} - " -fi +#!/usr/bin/with-contenv bash + +echo '--------------------------------' +echo '| Calibre-web theme.park Mod |' +echo '--------------------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n\ +'TP_COMMUNITY_THEME'=${TP_COMMUNITY_THEME}\\n\ +'TP_THEME'=${TP_THEME}\\n" + +# Set default +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to theme-park.dev' + TP_DOMAIN='theme-park.dev' +fi + +THEME_TYPE='theme-options' +if [ "${TP_COMMUNITY_THEME}" = true ]; then + THEME_TYPE='community-theme-options' +fi + +case ${TP_DOMAIN} in + *"github.io"*) + echo "Switching to github.io URL style" + TP_DOMAIN="${TP_DOMAIN}\/theme.park" + ;; +esac + +if [[ -z ${TP_THEME} ]]; then + echo 'No theme set, defaulting to organizr' + TP_THEME='organizr' +fi + +# Adding stylesheets +if ! grep -q "${TP_DOMAIN}/css/base" /app/calibre-web/cps/templates/layout.html; then + echo '---------------------------' + echo '| Adding the stylesheet |' + echo '---------------------------' + sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html + sed -i "s/<\/head>/<\/head> /g" /app/calibre-web/cps/templates/layout.html + printf 'Stylesheet set to %s\n' "${TP_THEME} + " +fi diff --git a/docker-mods/jellyfin/Dockerfile b/docker-mods/jellyfin/Dockerfile index ec6b3f13..1abfb02e 100644 --- a/docker-mods/jellyfin/Dockerfile +++ b/docker-mods/jellyfin/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Jellyfin" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Jellyfin" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/lazylibrarian/Dockerfile b/docker-mods/lazylibrarian/Dockerfile index 4be0d41e..9ffea13d 100644 --- a/docker-mods/lazylibrarian/Dockerfile +++ b/docker-mods/lazylibrarian/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Lazylibrarian" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Lazylibrarian" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/librespeed/Dockerfile b/docker-mods/librespeed/Dockerfile index 4327072e..7a6c3c55 100644 --- a/docker-mods/librespeed/Dockerfile +++ b/docker-mods/librespeed/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Librespeed" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Librespeed" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/lidarr/Dockerfile b/docker-mods/lidarr/Dockerfile index 47af2351..85e78850 100644 --- a/docker-mods/lidarr/Dockerfile +++ b/docker-mods/lidarr/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Lidarr" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Lidarr" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/mylar3/Dockerfile b/docker-mods/mylar3/Dockerfile index 68e5ff9e..25bd7925 100644 --- a/docker-mods/mylar3/Dockerfile +++ b/docker-mods/mylar3/Dockerfile @@ -1,7 +1,7 @@ -FROM scratch - - -LABEL maintainer="GilbN" -LABEL app="Mylar3" -#copy local files. +FROM scratch + + +LABEL maintainer="GilbN" +LABEL app="Mylar3" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/nzbget/Dockerfile b/docker-mods/nzbget/Dockerfile index 659555f2..398c5020 100644 --- a/docker-mods/nzbget/Dockerfile +++ b/docker-mods/nzbget/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="NZBGet" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="NZBGet" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/plex/Dockerfile b/docker-mods/plex/Dockerfile index f187b963..98607f37 100644 --- a/docker-mods/plex/Dockerfile +++ b/docker-mods/plex/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Plex" -#copy local files. -COPY root/ / +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Plex" +#copy local files. +COPY root/ / diff --git a/docker-mods/prowlarr/Dockerfile b/docker-mods/prowlarr/Dockerfile index c073ef52..e95447cb 100644 --- a/docker-mods/prowlarr/Dockerfile +++ b/docker-mods/prowlarr/Dockerfile @@ -1,7 +1,7 @@ -FROM scratch - - LABEL maintainer="GilbN" - LABEL app="Prowlarr" - -#copy local files. +FROM scratch + + LABEL maintainer="GilbN" + LABEL app="Prowlarr" + +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/qbittorrent/Dockerfile b/docker-mods/qbittorrent/Dockerfile index d789170f..4c3ca04c 100644 --- a/docker-mods/qbittorrent/Dockerfile +++ b/docker-mods/qbittorrent/Dockerfile @@ -1,7 +1,7 @@ -FROM scratch - - -LABEL maintainer="GilbN" -LABEL app="Qbittorrent" -#copy local files. +FROM scratch + + +LABEL maintainer="GilbN" +LABEL app="Qbittorrent" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/radarr/Dockerfile b/docker-mods/radarr/Dockerfile index 76c2cbc4..4cf8f536 100644 --- a/docker-mods/radarr/Dockerfile +++ b/docker-mods/radarr/Dockerfile @@ -1,7 +1,7 @@ -FROM scratch - - LABEL maintainer="GilbN" - LABEL app="Radarr" - -#copy local files. +FROM scratch + + LABEL maintainer="GilbN" + LABEL app="Radarr" + +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/readarr/Dockerfile b/docker-mods/readarr/Dockerfile index b931bcc5..da2c273f 100644 --- a/docker-mods/readarr/Dockerfile +++ b/docker-mods/readarr/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - - LABEL maintainer="GilbN" - LABEL app="Readarr" -#copy local files. +FROM scratch + + LABEL maintainer="GilbN" + LABEL app="Readarr" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/rutorrent/Dockerfile b/docker-mods/rutorrent/Dockerfile index cfc39fe1..fb7ecba0 100644 --- a/docker-mods/rutorrent/Dockerfile +++ b/docker-mods/rutorrent/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Rutorrent" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Rutorrent" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/sabnzbd/Dockerfile b/docker-mods/sabnzbd/Dockerfile index 1fcee76c..d17e97c7 100644 --- a/docker-mods/sabnzbd/Dockerfile +++ b/docker-mods/sabnzbd/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="SABnzbd" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="SABnzbd" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/sonarr/Dockerfile b/docker-mods/sonarr/Dockerfile index 203acbd2..77b59e36 100644 --- a/docker-mods/sonarr/Dockerfile +++ b/docker-mods/sonarr/Dockerfile @@ -1,7 +1,7 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Sonarr" - -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Sonarr" + +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/synclounge/Dockerfile b/docker-mods/synclounge/Dockerfile index 37f45d9c..8bc9733f 100644 --- a/docker-mods/synclounge/Dockerfile +++ b/docker-mods/synclounge/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Synclounge" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Synclounge" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/tautulli/Dockerfile b/docker-mods/tautulli/Dockerfile index 202d0efa..36910ca5 100644 --- a/docker-mods/tautulli/Dockerfile +++ b/docker-mods/tautulli/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Tautulli" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Tautulli" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/thelounge/Dockerfile b/docker-mods/thelounge/Dockerfile index 91402183..0dd3aaa4 100644 --- a/docker-mods/thelounge/Dockerfile +++ b/docker-mods/thelounge/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="The Lounge" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="The Lounge" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/transmission/Dockerfile b/docker-mods/transmission/Dockerfile index 45764bea..6c5dea86 100644 --- a/docker-mods/transmission/Dockerfile +++ b/docker-mods/transmission/Dockerfile @@ -1,6 +1,6 @@ -FROM scratch - -LABEL maintainer="GilbN" -LABEL app="Transmission" -#copy local files. +FROM scratch + +LABEL maintainer="GilbN" +LABEL app="Transmission" +#copy local files. COPY root/ / \ No newline at end of file diff --git a/docker-mods/vuetorrent/Dockerfile b/docker-mods/vuetorrent/Dockerfile index d71a8113..daf68646 100644 --- a/docker-mods/vuetorrent/Dockerfile +++ b/docker-mods/vuetorrent/Dockerfile @@ -1,7 +1,7 @@ -FROM scratch - - -LABEL maintainer="GilbN" -LABEL app="VueTorrent" -#copy local files. +FROM scratch + + +LABEL maintainer="GilbN" +LABEL app="VueTorrent" +#copy local files. COPY root/ / \ No newline at end of file From 2455e4aed3c6df724a00a533902935e1552acf01 Mon Sep 17 00:00:00 2001 From: gilbn Date: Thu, 16 Dec 2021 22:56:48 +0100 Subject: [PATCH 03/19] check for package manager --- .../qbittorrent/root/etc/cont-init.d/98-themepark | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark index 576bcff5..fcd3f20b 100644 --- a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark +++ b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark @@ -27,8 +27,13 @@ if ! [[ -x "$(command -v svn)" ]]; then echo '--------------------------' echo '| Installing svn package |' echo '--------------------------' - apt-get update && \ - apt-get install -y subversion + if [ -x "$(command -v apk)" ]; then + apk update && \ + apk add --no-cache subversion + elif [ -x "$(command -v apt-get)" ]; then + apt-get update && \ + apt-get install -y subversion + fi fi # Display variables for troubleshooting From f5e5cd0302da5e825933b6b7ca549f4f85f8e757 Mon Sep 17 00:00:00 2001 From: gilbn Date: Thu, 16 Dec 2021 23:06:40 +0100 Subject: [PATCH 04/19] vuetorrent check for pkg manager --- docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark index f2e3daed..28f360a3 100644 --- a/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark +++ b/docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark @@ -58,8 +58,13 @@ install_deps() { echo '-------------------------' echo '| Installing jq package |' echo '-------------------------' - apt-get update && - apt-get install -y jq + if [ -x "$(command -v apk)" ]; then + apk update && \ + apk add --no-cache jq + elif [ -x "$(command -v apt-get)" ]; then + apt-get update && \ + apt-get install -y jq + fi fi } check_updates() { From 0a3771420ec3a2de4cf30c1d4383db067e70ba16 Mon Sep 17 00:00:00 2001 From: gilbn Date: Tue, 21 Dec 2021 20:48:13 +0100 Subject: [PATCH 05/19] qbit mod sed body instead of head --- docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark index fcd3f20b..99dd3caa 100644 --- a/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark +++ b/docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark @@ -85,8 +85,8 @@ if [[ ! -d /themepark ]]; then fi sed_file(){ - sed -i "s/<\/head>/<\/head> /g" $1 - sed -i "s/<\/head>/<\/head> /g" $1 + sed -i "s/<\/body>/<\/body> /g" $1 + sed -i "s/<\/body>/<\/body> /g" $1 printf 'Stylesheet set to %s on %s\n\n' "${TP_THEME}" "$1" } From 1f971ab4639efd0a71f15ec8643e76264564fd84 Mon Sep 17 00:00:00 2001 From: GilbN Date: Thu, 6 Jan 2022 20:40:06 +0100 Subject: [PATCH 06/19] replace theme.css with tp imports instead of sed --- docker-mods/emby/root/etc/cont-init.d/98-themepark | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docker-mods/emby/root/etc/cont-init.d/98-themepark b/docker-mods/emby/root/etc/cont-init.d/98-themepark index ece07fda..91f67ef5 100644 --- a/docker-mods/emby/root/etc/cont-init.d/98-themepark +++ b/docker-mods/emby/root/etc/cont-init.d/98-themepark @@ -34,12 +34,5 @@ if [[ -z ${TP_THEME} ]]; then fi # Adding stylesheets -if ! grep -q "${TP_DOMAIN}/css/base" /app/emby/dashboard-ui/index.html; then - echo '---------------------------' - echo '| Adding the stylesheet |' - echo '---------------------------' - sed -i "s/<\/body>/<\/body> /g" /app/emby/dashboard-ui/index.html - sed -i "s/<\/body>/<\/body> /g" /app/emby/dashboard-ui/index.html - printf 'Stylesheet set to %s\n' "${TP_THEME} - " -fi +printf '%s\n' "@import url('https://${TP_DOMAIN}/css/${THEME_TYPE}/${TP_THEME}.css');" "@import url('https://${TP_DOMAIN}/css/base/emby/emby-base.css');" > /app/emby/dashboard-ui/modules/themes/light/theme.css +printf 'Stylesheet set to %s\n' "${TP_THEME}" From 83213d91a846b57b6bed4763358f1db42c57867d Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Tue, 15 Feb 2022 22:23:18 +0100 Subject: [PATCH 07/19] meta color --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e1e6ef0c..3b48e89c 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ theme.park - A collection of themes/skins for your favorite apps! - + From e22d4e12c86abd88132cc204d957ff4c0438fbd6 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Tue, 1 Mar 2022 14:53:20 +0100 Subject: [PATCH 08/19] added branch note --- .github/CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index db674b02..3121d921 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,6 +1,7 @@ # Contributing to theme.park - If you want to discuss changes, you can also bring it up in our Discord server +- PR's are done against the develop branch. ## New theme option From 0ebee551ca5e01b5e69816312fbd62f96b133d83 Mon Sep 17 00:00:00 2001 From: Thomas Anderson Date: Tue, 1 Mar 2022 11:39:40 -0500 Subject: [PATCH 09/19] Fix new index.html path Theme was broken, now it is fixed :) --- docker-mods/deluge/root/etc/cont-init.d/98-themepark | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-mods/deluge/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark index 8ca49502..4a32dafb 100644 --- a/docker-mods/deluge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark @@ -34,12 +34,13 @@ if [[ -z ${TP_THEME} ]]; then fi # Adding stylesheets -if ! grep -q "${TP_DOMAIN}/css/base" /usr/lib/python3/dist-packages/deluge/ui/web/index.html; then +INDEX_HTML='/usr/lib/python3.10/site-packages/deluge/ui/web/index.html' +if ! grep -q "${TP_DOMAIN}/css/base" "$INDEX_HTML"; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html - sed -i "s/<\/head>/<\/head> /g" /usr/lib/python3/dist-packages/deluge/ui/web/index.html + sed -i "s/<\/head>/<\/head> /g" "$INDEX_HTML" + sed -i "s/<\/head>/<\/head> /g" "$INDEX_HTML" printf 'Stylesheet set to %s\n' "${TP_THEME} " -fi \ No newline at end of file +fi From 8d3bd4ac4e9d732851df29e7c96003f712855ff1 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Wed, 2 Mar 2022 16:09:30 +0100 Subject: [PATCH 10/19] bump --- docker-mods/deluge/root/etc/cont-init.d/98-themepark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-mods/deluge/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark index 4a32dafb..70f767fe 100644 --- a/docker-mods/deluge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv bash +#!/usr/bin/with-contenv bash echo '---------------------------' echo '| Deluge theme.park Mod |' From f54c4618dffc695efe87efeb33ea6d8151e57f3e Mon Sep 17 00:00:00 2001 From: GilbN Date: Sun, 13 Mar 2022 17:36:29 +0100 Subject: [PATCH 11/19] Deluge: docker mod path fix --- docker-mods/deluge/root/etc/cont-init.d/98-themepark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-mods/deluge/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark index 70f767fe..afc187ec 100644 --- a/docker-mods/deluge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark @@ -34,7 +34,7 @@ if [[ -z ${TP_THEME} ]]; then fi # Adding stylesheets -INDEX_HTML='/usr/lib/python3.10/site-packages/deluge/ui/web/index.html' +INDEX_HTML='/usr/lib/python3/dist-packages/deluge/ui/web/index.html' if ! grep -q "${TP_DOMAIN}/css/base" "$INDEX_HTML"; then echo '---------------------------' echo '| Adding the stylesheet |' From 296f7aa696f8a821c395c8eda573bb2595c8f03d Mon Sep 17 00:00:00 2001 From: GilbN Date: Sat, 19 Mar 2022 10:31:38 +0100 Subject: [PATCH 12/19] Deluge docker mod: path fix for #332 --- docker-mods/deluge/root/etc/cont-init.d/98-themepark | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-mods/deluge/root/etc/cont-init.d/98-themepark b/docker-mods/deluge/root/etc/cont-init.d/98-themepark index afc187ec..9bbd3ea8 100644 --- a/docker-mods/deluge/root/etc/cont-init.d/98-themepark +++ b/docker-mods/deluge/root/etc/cont-init.d/98-themepark @@ -34,13 +34,13 @@ if [[ -z ${TP_THEME} ]]; then fi # Adding stylesheets -INDEX_HTML='/usr/lib/python3/dist-packages/deluge/ui/web/index.html' -if ! grep -q "${TP_DOMAIN}/css/base" "$INDEX_HTML"; then +DELUGE_INDEX_PATH=$(find -name index.html) +if ! grep -q "${TP_DOMAIN}/css/base" ${DELUGE_INDEX_PATH}; then echo '---------------------------' echo '| Adding the stylesheet |' echo '---------------------------' - sed -i "s/<\/head>/<\/head> /g" "$INDEX_HTML" - sed -i "s/<\/head>/<\/head> /g" "$INDEX_HTML" + sed -i "s/<\/head>/<\/head> /g" ${DELUGE_INDEX_PATH} + sed -i "s/<\/head>/<\/head> /g" ${DELUGE_INDEX_PATH} printf 'Stylesheet set to %s\n' "${TP_THEME} " fi From 8b96ee449aa3527a74b4df1aec67dc41f0a897f3 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Sun, 20 Mar 2022 17:16:25 +0100 Subject: [PATCH 13/19] theme.park docker --- .github/workflows/docker-build.yml | 35 +++++++++++++++++++++++ docker/Dockerfile | 40 +++++++++++++++++++-------- docker/root/defaults/default | 24 ++++++++++++++++ docker/root/etc/cont-init.d/50-config | 20 ++++++++++++++ 4 files changed, 108 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/docker-build.yml create mode 100644 docker/root/defaults/default create mode 100644 docker/root/etc/cont-init.d/50-config diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 00000000..927561d3 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,35 @@ +name: docker build +on: + release: + branches: + - live + - live_develop +jobs: + push_to_ghcr_io: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + - name: Set current date as env variable + id: date_time + run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S') + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + - name: build&push + if: ${{ github.ref == 'refs/heads/live' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push ghcr.io/gilbn/theme.park + if: ${{ github.ref == 'refs/heads/live_develop' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push --all-tags ghcr.io/gilbn/theme.park:develop diff --git a/docker/Dockerfile b/docker/Dockerfile index a9005e4e..b3c14960 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,18 +1,36 @@ FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.14 -LABEL maintainer="Roxedus" - -COPY / /themepark +# set version label +ARG BUILD_DATE +ARG TP_RELEASE +LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="gilbn" RUN \ echo " ## Installing packages ## " && \ apk add --no-cache --virtual=build-dependencies \ - python3 + curl && \ + echo "**** install theme.park ****" && \ + mkdir -p /app/themepark && \ + if [ -z ${TP_RELEASE+x} ]; then \ + TP_RELEASE=$(curl -sX GET "https://api.github.com/repos/gilbn/theme.park/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + curl -o \ + /tmp/themepark.tar.gz -L \ + "https://github.com/GilbN/theme.park/archive/refs/tags/${TP_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/themepark.tar.gz -C \ + /app/themepark/ --strip-components=1 && \ + cd /app/themepark && \ + echo "**** cleanup ****" && \ + apk del --purge \ + build-dependencies && \ + rm -rf \ + /root/.cache \ + /tmp/* \ + /app/themepark/docker-mods \ + /app/themepark/resources/organizr - -# RUN mkdir -p /usr/share/nginx/html/css/ -# RUN mkdir -p /usr/share/nginx/html/resources/ -# RUN cp -R css/ /usr/share/nginx/html/css/ -# RUN cp -R resources/ /usr/share/nginx/html/resources/ -# RUN cp index.html /usr/share/nginx/html/index.html -#rm -rf /themepark \ No newline at end of file +# copy local files +COPY root/ / diff --git a/docker/root/defaults/default b/docker/root/defaults/default new file mode 100644 index 00000000..2dd596d4 --- /dev/null +++ b/docker/root/defaults/default @@ -0,0 +1,24 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + + server_name _; + + root /app/themepark; + index index.html index.htm index.php; + + location / { + sub_filter_types *; + sub_filter 'https://theme-park.dev' $scheme://TP_DOMAIN; + sub_filter 'https://develop.theme-park.dev' $scheme://TP_DOMAIN; + sub_filter_once off; + try_files $uri $uri/ /index.html /index.php?$args =404; + } + + # Don't cache + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + if_modified_since off; + expires -1; + etag off; +} diff --git a/docker/root/etc/cont-init.d/50-config b/docker/root/etc/cont-init.d/50-config new file mode 100644 index 00000000..493fafb4 --- /dev/null +++ b/docker/root/etc/cont-init.d/50-config @@ -0,0 +1,20 @@ +#!/usr/bin/with-contenv bash + +echo '------------------' +echo '| theme.park |' +echo '------------------' + +# Display variables for troubleshooting +echo -e "Variables set:\\n\ +'TP_DOMAIN'=${TP_DOMAIN}\\n" + +if [[ -z ${TP_DOMAIN} ]]; then + echo 'No domain set, defaulting to $http_host' + TP_DOMAIN='$http_host' +fi + +DEFAULT='/config/nginx/site-confs/default' +if ! grep -q "sub_filter 'https://theme-park.dev' \$scheme://${TP_DOMAIN};" ${DEFAULT}; then + sed -i "s/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT} + sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT} +fi \ No newline at end of file From ed181c5573a9734c5cc5776a14b764f0b04547dc Mon Sep 17 00:00:00 2001 From: GilbN Date: Sun, 20 Mar 2022 17:35:12 +0100 Subject: [PATCH 14/19] dockerhub job --- .github/workflows/docker-build.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 927561d3..7f8f2087 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -32,4 +32,31 @@ jobs: if: ${{ github.ref == 'refs/heads/live_develop' }} run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} - docker push --all-tags ghcr.io/gilbn/theme.park:develop + docker push --all-tags ghcr.io/gilbn/theme.park + push_to_dockerhub: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + - name: Set current date as env variable + id: date_time + run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S') + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DH_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build&push + if: ${{ github.ref == 'refs/heads/live' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push ghcr.io/gilbn/theme.park + if: ${{ github.ref == 'refs/heads/live_develop' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push --all-tags gilbn/theme.park \ No newline at end of file From 19b3a4405ac1cb378c95f85b8450717f7a149c11 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Sun, 20 Mar 2022 17:36:31 +0100 Subject: [PATCH 15/19] dockerhub job --- .github/workflows/docker-build.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 927561d3..1f0c477d 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -32,4 +32,31 @@ jobs: if: ${{ github.ref == 'refs/heads/live_develop' }} run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} - docker push --all-tags ghcr.io/gilbn/theme.park:develop + docker push --all-tags ghcr.io/gilbn/theme.park + push_to_dockerhub: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + - name: Set current date as env variable + id: date_time + run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S') + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DH_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build&push + if: ${{ github.ref == 'refs/heads/live' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push ghcr.io/gilbn/theme.park + if: ${{ github.ref == 'refs/heads/live_develop' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push --all-tags gilbn/theme.park From e33febebe0822b52183e031461374520549be228 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:04:35 +0100 Subject: [PATCH 16/19] split build&push --- .github/workflows/docker-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 1f0c477d..59188951 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -25,12 +25,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} - name: build&push - if: ${{ github.ref == 'refs/heads/live' }} - run: | + if1: "${{ github.ref == 'refs/heads/live' }}" + run1: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push ghcr.io/gilbn/theme.park - if: ${{ github.ref == 'refs/heads/live_develop' }} - run: | + if2: "${{ github.ref == 'refs/heads/live_develop' }}" + run2: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push --all-tags ghcr.io/gilbn/theme.park push_to_dockerhub: @@ -51,12 +51,13 @@ jobs: with: username: ${{ secrets.DH_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: build&push - if: ${{ github.ref == 'refs/heads/live' }} + - name: build&push live + if: "${{ github.ref == 'refs/heads/live' }}" run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push ghcr.io/gilbn/theme.park - if: ${{ github.ref == 'refs/heads/live_develop' }} + - name: build&push dev + if: "${{ github.ref == 'refs/heads/live_develop' }}" run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push --all-tags gilbn/theme.park From 80bbcba6797881b62cccd02687682a6148377ca7 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:07:07 +0100 Subject: [PATCH 17/19] name fix --- .github/workflows/docker-build.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 59188951..34ec9524 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -24,13 +24,14 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} - - name: build&push - if1: "${{ github.ref == 'refs/heads/live' }}" - run1: | + - name: build&push live + if: ${{ github.ref == 'refs/heads/live' }} + run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push ghcr.io/gilbn/theme.park - if2: "${{ github.ref == 'refs/heads/live_develop' }}" - run2: | + - name: build&push dev + if: ${{ github.ref == 'refs/heads/live_develop' }} + run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push --all-tags ghcr.io/gilbn/theme.park push_to_dockerhub: @@ -51,13 +52,13 @@ jobs: with: username: ${{ secrets.DH_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: build&push live - if: "${{ github.ref == 'refs/heads/live' }}" + - name: build&push dh live + if: ${{ github.ref == 'refs/heads/live' }} run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push ghcr.io/gilbn/theme.park - - name: build&push dev - if: "${{ github.ref == 'refs/heads/live_develop' }}" + - name: build&push dh dev + if: ${{ github.ref == 'refs/heads/live_develop' }} run: | docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} docker push --all-tags gilbn/theme.park From 275001e2153bed96f049d4e14aa7efba75670b07 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:13:05 +0100 Subject: [PATCH 18/19] add type published --- .github/workflows/docker-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 34ec9524..12aeec75 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,6 +1,7 @@ name: docker build on: release: + types: [published] branches: - live - live_develop From 19091440ab9e7a3c699228cf90bba458e4027325 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:20:11 +0100 Subject: [PATCH 19/19] types --- .github/workflows/docker-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 12aeec75..d99e7640 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,7 +1,8 @@ name: docker build on: release: - types: [published] + types: + - published branches: - live - live_develop