|
|
@ -6,37 +6,42 @@ while ! pg_isready -h $DB_HOST -U $DB_USER; do
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
DST_DIR=/var/www/html/tt-rss
|
|
|
|
DST_DIR=/var/www/html/tt-rss
|
|
|
|
SRC_REPO=https://git.tt-rss.org/fox/tt-rss.git
|
|
|
|
SRC_DIR=/src/tt-rss/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ -e $DST_DIR ] && rm -f $DST_DIR/.app_is_ready
|
|
|
|
|
|
|
|
|
|
|
|
export PGPASSWORD=$DB_PASS
|
|
|
|
export PGPASSWORD=$DB_PASS
|
|
|
|
|
|
|
|
|
|
|
|
[ ! -e /var/www/html/index.php ] && cp /index.php /var/www/html
|
|
|
|
[ ! -e /var/www/html/index.php ] && cp /index.php /var/www/html
|
|
|
|
|
|
|
|
|
|
|
|
PSQL="psql -q -h $DB_HOST -U $DB_USER $DB_NAME"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d $DST_DIR ]; then
|
|
|
|
if [ ! -d $DST_DIR ]; then
|
|
|
|
mkdir -p $DST_DIR
|
|
|
|
rsync -aP \
|
|
|
|
git clone $SRC_REPO $DST_DIR
|
|
|
|
$SRC_DIR/ $DST_DIR/
|
|
|
|
else
|
|
|
|
else
|
|
|
|
cd $DST_DIR && \
|
|
|
|
rsync -aP --delete \
|
|
|
|
git config core.filemode false && \
|
|
|
|
--exclude cache \
|
|
|
|
git pull origin master
|
|
|
|
--exclude lock \
|
|
|
|
|
|
|
|
--exclude feed-icons \
|
|
|
|
|
|
|
|
--exclude plugins.local \
|
|
|
|
|
|
|
|
--exclude themes.local \
|
|
|
|
|
|
|
|
$SRC_DIR/ $DST_DIR/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rsync -aP --delete \
|
|
|
|
|
|
|
|
$SRC_DIR/plugins.local/nginx_xaccel $DST_DIR/plugins.local/nginx_xaccel
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d $DST_DIR/plugins.local/nginx_xaccel ]; then
|
|
|
|
for d in cache lock feed-icons plugins.local themes.local; do
|
|
|
|
git clone https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git $DST_DIR/plugins.local/nginx_xaccel
|
|
|
|
mkdir -p $DST_DIR/$d
|
|
|
|
else
|
|
|
|
done
|
|
|
|
cd $DST_DIR/plugins.local/nginx_xaccel && \
|
|
|
|
|
|
|
|
git config core.filemode false && \
|
|
|
|
|
|
|
|
git pull origin master
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chown -R $OWNER_UID:$OWNER_GID $DST_DIR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for d in cache lock feed-icons; do
|
|
|
|
for d in cache lock feed-icons; do
|
|
|
|
chmod -R 777 $DST_DIR/$d
|
|
|
|
chmod -R 777 $DST_DIR/$d
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chown -R $OWNER_UID:$OWNER_GID $DST_DIR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PSQL="psql -q -h $DB_HOST -U $DB_USER $DB_NAME"
|
|
|
|
|
|
|
|
|
|
|
|
$PSQL -c "create extension if not exists pg_trgm"
|
|
|
|
$PSQL -c "create extension if not exists pg_trgm"
|
|
|
|
|
|
|
|
|
|
|
|
RESTORE_SCHEMA=/var/www/html/tt-rss/backups/restore-schema.sql.gz
|
|
|
|
RESTORE_SCHEMA=/var/www/html/tt-rss/backups/restore-schema.sql.gz
|
|
|
@ -68,5 +73,7 @@ else
|
|
|
|
-i.bak $DST_DIR/config.php
|
|
|
|
-i.bak $DST_DIR/config.php
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
touch $DST_DIR/.app_is_ready
|
|
|
|
|
|
|
|
|
|
|
|
exec /usr/sbin/php-fpm7 -F
|
|
|
|
exec /usr/sbin/php-fpm7 -F
|
|
|
|
|
|
|
|
|
|
|
|