update all local plugins on startup, unless forbidden by TTRSS_NO_STARTUP_PLUGIN_UPDATES

pull/5/head
Andrew Dolgov 3 years ago
parent 5f3a1bcc75
commit 13e08cfb59

@ -31,6 +31,9 @@ RUN sh -c ${SCRIPT_ROOT}/build-prepare.sh
ENV OWNER_UID=1000 ENV OWNER_UID=1000
ENV OWNER_GID=1000 ENV OWNER_GID=1000
# don't try to update local plugins on startup
ENV TTRSS_NO_STARTUP_PLUGIN_UPDATES=""
# TTRSS_XDEBUG_HOST defaults to host IP if unset # TTRSS_XDEBUG_HOST defaults to host IP if unset
ENV TTRSS_XDEBUG_ENABLED="" ENV TTRSS_XDEBUG_ENABLED=""
ENV TTRSS_XDEBUG_HOST="" ENV TTRSS_XDEBUG_HOST=""

@ -46,6 +46,21 @@ for d in cache lock feed-icons plugins.local themes.local; do
mkdir -p $DST_DIR/$d mkdir -p $DST_DIR/$d
done done
if [ -z "$TTRSS_NO_STARTUP_PLUGIN_UPDATES" ]; then
echo updating all local plugins...
find $DST_DIR/plugins.local -type d -maxdepth 1 | while read PLUGIN; do
echo updating $PLUGIN...
cd $PLUGIN && \
git config core.filemode false && \
git config pull.rebase false && \
git pull origin master || echo warning: attempt to update plugin $PLUGIN failed.
done
else
echo skipping local plugin updates, disabled.
fi
cp ${SCRIPT_ROOT}/config.docker.php $DST_DIR/config.php cp ${SCRIPT_ROOT}/config.docker.php $DST_DIR/config.php
chmod 644 $DST_DIR/config.php chmod 644 $DST_DIR/config.php

@ -9,7 +9,7 @@ services:
restart: unless-stopped restart: unless-stopped
web-nginx: web-nginx:
image: cthulhoo/ttrss-web-nginx:latest image: cthulhoo/ttrss-web-nginx:${BUILD_TAG}
build: ./web-nginx build: ./web-nginx
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:

Loading…
Cancel
Save