php8 -> php7

remotes/origin/dynamic-php7
Andrew Dolgov 4 years ago
parent ab100cd2db
commit 63da5e550a

@ -1,21 +1,21 @@
FROM alpine:3.13
FROM alpine:3.12
EXPOSE 9000/tcp
ENV SCRIPT_ROOT=/opt/tt-rss
RUN apk add --no-cache dcron php8 php8-fpm \
php8-pdo php8-gd php8-pgsql php8-pdo_pgsql \
php8-mbstring php8-intl php8-xml php8-curl \
php8-session php8-tokenizer php8-dom php8-fileinfo \
php8-json php8-iconv php8-pcntl php8-posix php8-zip php8-exif \
php8-openssl git postgresql-client sudo php8-pecl-xdebug rsync && \
sed -i 's/\(memory_limit =\) 128M/\1 256M/' /etc/php8/php.ini && \
RUN apk add --no-cache dcron php7 php7-fpm \
php7-pdo php7-gd php7-pgsql php7-pdo_pgsql \
php7-mbstring php7-intl php7-xml php7-curl \
php7-session php7-tokenizer php7-dom php7-fileinfo \
php7-json php7-iconv php7-pcntl php7-posix php7-zip php7-exif \
php7-openssl git postgresql-client sudo php7-pecl-xdebug rsync && \
sed -i 's/\(memory_limit =\) 128M/\1 256M/' /etc/php7/php.ini && \
sed -i -e 's/^listen = 127.0.0.1:9000/listen = 9000/' \
-e 's/;\(clear_env\) = .*/\1 = no/i' \
-e 's/^\(user\|group\) = .*/\1 = app/i' \
-e 's/;\(php_admin_value\[error_log\]\) = .*/\1 = \/tmp\/error.log/' \
-e 's/;\(php_admin_flag\[log_errors\]\) = .*/\1 = on/' \
/etc/php8/php-fpm.d/www.conf && \
/etc/php7/php-fpm.d/www.conf && \
mkdir -p /var/www ${SCRIPT_ROOT}/config.d
ADD startup.sh ${SCRIPT_ROOT}
@ -38,7 +38,7 @@ ENV TTRSS_DB_HOST="db"
ENV TTRSS_DB_PORT="5432"
ENV TTRSS_MYSQL_CHARSET="UTF8"
ENV TTRSS_PHP_EXECUTABLE="/usr/bin/php8"
ENV TTRSS_PHP_EXECUTABLE="/usr/bin/php7"
ENV TTRSS_PLUGINS="auth_internal, note, nginx_xaccel"
CMD ${SCRIPT_ROOT}/startup.sh

@ -58,7 +58,7 @@ cp ${SCRIPT_ROOT}/config.docker.php $DST_DIR/config.php
chmod 644 $DST_DIR/config.php
chown -R $OWNER_UID:$OWNER_GID $DST_DIR \
/var/log/php8
/var/log/php7
for d in cache lock feed-icons; do
chmod 777 $DST_DIR/$d
@ -83,7 +83,7 @@ if [ ! -z "${TTRSS_XDEBUG_ENABLED}" ]; then
fi
echo enabling xdebug with the following parameters:
env | grep TTRSS_XDEBUG
cat > /etc/php8/conf.d/50_xdebug.ini <<EOF
cat > /etc/php7/conf.d/50_xdebug.ini <<EOF
zend_extension=xdebug.so
xdebug.mode=develop,trace,debug
xdebug.start_with_request = yes
@ -92,7 +92,7 @@ xdebug.client_host = ${TTRSS_XDEBUG_HOST}
EOF
fi
cd $DST_DIR && sudo -E -u app php8 ./update.php --update-schema=force-yes
cd $DST_DIR && sudo -E -u app php7 ./update.php --update-schema=force-yes
rm -f /tmp/error.log && mkfifo /tmp/error.log && chown app:app /tmp/error.log
@ -100,4 +100,4 @@ rm -f /tmp/error.log && mkfifo /tmp/error.log && chown app:app /tmp/error.log
touch $DST_DIR/.app_is_ready
exec /usr/sbin/php-fpm8 --nodaemonize --force-stderr
exec /usr/sbin/php-fpm7 --nodaemonize --force-stderr

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

Loading…
Cancel
Save