move to php8; reduce rsync noise on startup

pull/5/head
Andrew Dolgov 4 years ago
parent 04bd938208
commit cedf9fb516

@ -1,11 +1,11 @@
FROM alpine:3.12 FROM alpine:3.13
EXPOSE 9000/tcp EXPOSE 9000/tcp
RUN apk add --no-cache dcron php7 php7-fpm \ RUN apk add --no-cache dcron php8 php8-fpm \
php7-pdo php7-gd php7-pgsql php7-pdo_pgsql php7-mbstring \ php8-pdo php8-gd php8-pgsql php8-pdo_pgsql php8-mbstring \
php7-intl php7-xml php7-curl php7-session \ php8-intl php8-xml php8-curl php8-session \
php7-dom php7-fileinfo php7-json php7-iconv \ php8-dom php8-fileinfo php8-json php8-iconv \
php7-pcntl php7-posix php7-zip php7-openssl \ php8-pcntl php8-posix php8-zip php8-openssl \
git postgresql-client sudo rsync git postgresql-client sudo rsync
ENV SCRIPT_ROOT=/opt/tt-rss ENV SCRIPT_ROOT=/opt/tt-rss
@ -20,9 +20,9 @@ ADD backup.sh /etc/periodic/weekly/backup
ADD config.docker.php ${SCRIPT_ROOT} ADD config.docker.php ${SCRIPT_ROOT}
ADD build-prepare.sh ${SCRIPT_ROOT} ADD build-prepare.sh ${SCRIPT_ROOT}
RUN sed -i.bak 's/^listen = 127.0.0.1:9000/listen = 9000/' /etc/php7/php-fpm.d/www.conf RUN sed -i.bak 's/^listen = 127.0.0.1:9000/listen = 9000/' /etc/php8/php-fpm.d/www.conf
RUN sed -i.bak 's/\(memory_limit =\) 128M/\1 256M/' /etc/php7/php.ini RUN sed -i.bak 's/\(memory_limit =\) 128M/\1 256M/' /etc/php8/php.ini
RUN sed -i.bak 's/;clear_env = .*/clear_env = no/i' /etc/php7/php-fpm.d/www.conf RUN sed -i.bak 's/;clear_env = .*/clear_env = no/i' /etc/php8/php-fpm.d/www.conf
RUN sh -c ${SCRIPT_ROOT}/build-prepare.sh RUN sh -c ${SCRIPT_ROOT}/build-prepare.sh

@ -24,10 +24,10 @@ export PGPASSWORD=$TTRSS_DB_PASS
[ ! -e /var/www/html/index.php ] && cp ${SCRIPT_ROOT}/index.php /var/www/html [ ! -e /var/www/html/index.php ] && cp ${SCRIPT_ROOT}/index.php /var/www/html
if [ ! -d $DST_DIR ]; then if [ ! -d $DST_DIR ]; then
rsync -aP \ rsync -a \
$SRC_DIR/ $DST_DIR/ $SRC_DIR/ $DST_DIR/
else else
rsync -aP --delete \ rsync -a --delete \
--exclude cache \ --exclude cache \
--exclude lock \ --exclude lock \
--exclude feed-icons \ --exclude feed-icons \
@ -37,7 +37,7 @@ else
--exclude config.php \ --exclude config.php \
$SRC_DIR/ $DST_DIR/ $SRC_DIR/ $DST_DIR/
rsync -aP --delete \ rsync -a --delete \
$SRC_DIR/plugins.local/nginx_xaccel $DST_DIR/plugins.local/nginx_xaccel $SRC_DIR/plugins.local/nginx_xaccel $DST_DIR/plugins.local/nginx_xaccel
fi fi
@ -46,7 +46,7 @@ for d in cache lock feed-icons plugins.local themes.local; do
done done
chown -R $OWNER_UID:$OWNER_GID $DST_DIR \ chown -R $OWNER_UID:$OWNER_GID $DST_DIR \
/var/log/php7 /var/log/php8
for d in cache lock feed-icons; do for d in cache lock feed-icons; do
chmod 777 $DST_DIR/$d chmod 777 $DST_DIR/$d
@ -78,9 +78,9 @@ fi
# this was previously generated # this was previously generated
rm -f $DST_DIR/config.php.bak rm -f $DST_DIR/config.php.bak
cd $DST_DIR && sudo -E -u app php ./update.php --update-schema=force-yes cd $DST_DIR && sudo -E -u app php8 ./update.php --update-schema=force-yes
touch $DST_DIR/.app_is_ready touch $DST_DIR/.app_is_ready
sudo -E -u app /usr/sbin/php-fpm7 -F sudo -E -u app /usr/sbin/php-fpm8 -F

@ -24,4 +24,4 @@ while [ ! -s $DST_DIR/config.php -a -e $DST_DIR/.app_is_ready ]; do
sleep 3 sleep 3
done done
sudo -E -u app /usr/bin/php /var/www/html/tt-rss/update_daemon2.php sudo -E -u app /usr/bin/php8 /var/www/html/tt-rss/update_daemon2.php

Loading…
Cancel
Save