Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose plugins.local and themes.local via Docker volume #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ ENV DB_NAME ttrss
ENV DB_USER ttrss
ENV DB_PASS ttrss

# Expose volumes
VOLUME [ "/var/www/ttrss-plugins", "/var/www/ttrss-themes" ]

# Clean up.
RUN set -xe && apk del --progress --purge && rm -rf /var/cache/apk/*

Expand Down
7 changes: 7 additions & 0 deletions root/srv/setup-ttrss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ setup_ttrss()
echo "Setup: Setting up Tiny Tiny RSS (latest revision) ..."
git clone --depth=1 https://tt-rss.org/gitlab/fox/tt-rss.git ${TTRSS_PATH}
fi
# Move pristine directories (re-used for updates), create links to volume mounts
mkdir -p ${TTRSS_PATH}.orig ${TTRSS_PATH}.temp
mv ${TTRSS_PATH}/plugins.local ${TTRSS_PATH}/themes.local ${TTRSS_PATH}.orig/
mkdir -p ${TTRSS_PATH}-plugins ${TTRSS_PATH}-themes
ln -s ${TTRSS_PATH}-plugins ${TTRSS_PATH}/plugins.local
ln -s ${TTRSS_PATH}-themes ${TTRSS_PATH}/themes.local
# Clone default plugins / themes
git clone --depth=1 https://github.com/sepich/tt-rss-mobilize.git ${TTRSS_PATH}/plugins/mobilize
git clone --depth=1 https://github.com/hrk/tt-rss-newsplus-plugin.git ${TTRSS_PATH}/plugins/api_newsplus
git clone --depth=1 https://github.com/m42e/ttrss_plugin-feediron.git ${TTRSS_PATH}/plugins/feediron
Expand Down
14 changes: 13 additions & 1 deletion root/srv/update-ttrss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ update_ttrss()
fi

echo "Updating: Tiny Tiny RSS"
( cd ${TTRSS_PATH} && git pull origin HEAD )
# Restore original files to avoid git conflicts
cd ${TTRSS_PATH}
mv plugins.local ${TTRSS_PATH}.temp/
mv ${TTRSS_PATH}.orig/plugins.local .
mv themes.local ${TTRSS_PATH}.temp/
mv ${TTRSS_PATH}.orig/themes.local .
# Update
git pull origin HEAD
# Switch back to links
mv plugins.local ${TTRSS_PATH}.orig/
mv ${TTRSS_PATH}.temp/plugins.local .
mv themes.local ${TTRSS_PATH}.orig/
mv ${TTRSS_PATH}.temp/themes.local .
}

update_plugin_mobilize()
Expand Down