diff options
author | Andrew Dolgov <[email protected]> | 2023-05-15 14:56:45 +0000 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-05-15 14:56:45 +0000 |
commit | a4543de3ac4b8b4e81f317a5ebb0d88004e3884c (patch) | |
tree | 087732c7b0696de482c30bfc59d12498f73680c3 /.docker/app | |
parent | 11946f0148d0b8a76ecc120fd9c1dc0b7fa04664 (diff) | |
parent | b1187f0db60008b139c5dd0820fd83ac38b6b347 (diff) |
Merge branch 'feature/php8.2' into 'master'
Bump to Alpine 3.18, PHP 8.2
See merge request tt-rss/tt-rss!4
Diffstat (limited to '.docker/app')
-rw-r--r-- | .docker/app/Dockerfile | 20 | ||||
-rw-r--r-- | .docker/app/startup.sh | 24 | ||||
-rw-r--r-- | .docker/app/updater.sh | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/.docker/app/Dockerfile b/.docker/app/Dockerfile index e1a70d011..8cf9591d0 100644 --- a/.docker/app/Dockerfile +++ b/.docker/app/Dockerfile @@ -1,22 +1,22 @@ -FROM registry.fakecake.org/docker.io/alpine:3.17 +FROM registry.fakecake.org/docker.io/alpine:3.18 EXPOSE 9000/tcp ENV SCRIPT_ROOT=/opt/tt-rss ENV SRC_DIR=/src/tt-rss/ -RUN apk add --no-cache dcron php81 php81-fpm php81-phar php81-sockets php81-pecl-apcu \ - php81-pdo php81-gd php81-pgsql php81-pdo_pgsql php81-xmlwriter php81-opcache \ - php81-mbstring php81-intl php81-xml php81-curl php81-simplexml \ - php81-session php81-tokenizer php81-dom php81-fileinfo php81-ctype \ - php81-json php81-iconv php81-pcntl php81-posix php81-zip php81-exif \ - php81-openssl git postgresql-client sudo php81-pecl-xdebug rsync tzdata && \ - sed -i 's/\(memory_limit =\) 128M/\1 256M/' /etc/php81/php.ini && \ +RUN apk add --no-cache dcron php82 php82-fpm php82-phar php82-sockets php82-pecl-apcu \ + php82-pdo php82-gd php82-pgsql php82-pdo_pgsql php82-xmlwriter php82-opcache \ + php82-mbstring php82-intl php82-xml php82-curl php82-simplexml \ + php82-session php82-tokenizer php82-dom php82-fileinfo php82-ctype \ + php82-json php82-iconv php82-pcntl php82-posix php82-zip php82-exif \ + php82-openssl git postgresql-client sudo php82-pecl-xdebug rsync tzdata && \ + sed -i 's/\(memory_limit =\) 128M/\1 256M/' /etc/php82/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/php81/php-fpm.d/www.conf && \ + /etc/php82/php-fpm.d/www.conf && \ mkdir -p /var/www ${SCRIPT_ROOT}/config.d ARG CI_COMMIT_BRANCH @@ -81,7 +81,7 @@ ENV TTRSS_DB_HOST="db" ENV TTRSS_DB_PORT="5432" ENV TTRSS_MYSQL_CHARSET="UTF8" -ENV TTRSS_PHP_EXECUTABLE="/usr/bin/php81" +ENV TTRSS_PHP_EXECUTABLE="/usr/bin/php82" ENV TTRSS_PLUGINS="auth_internal, note, nginx_xaccel" CMD ${SCRIPT_ROOT}/startup.sh diff --git a/.docker/app/startup.sh b/.docker/app/startup.sh index 134428276..6d867af52 100644 --- a/.docker/app/startup.sh +++ b/.docker/app/startup.sh @@ -61,7 +61,7 @@ sudo -u app 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/php81 + /var/log/php82 if [ -z "$TTRSS_NO_STARTUP_PLUGIN_UPDATES" ]; then echo updating all local plugins... @@ -100,7 +100,7 @@ if [ ! -z "${TTRSS_XDEBUG_ENABLED}" ]; then fi echo enabling xdebug with the following parameters: env | grep TTRSS_XDEBUG - cat > /etc/php81/conf.d/50_xdebug.ini <<EOF + cat > /etc/php82/conf.d/50_xdebug.ini <<EOF zend_extension=xdebug.so xdebug.mode=develop,trace,debug xdebug.start_with_request = yes @@ -110,17 +110,17 @@ EOF fi sed -i.bak "s/^\(memory_limit\) = \(.*\)/\1 = ${PHP_WORKER_MEMORY_LIMIT}/" \ - /etc/php81/php.ini + /etc/php82/php.ini sed -i.bak "s/^\(pm.max_children\) = \(.*\)/\1 = ${PHP_WORKER_MAX_CHILDREN}/" \ - /etc/php81/php-fpm.d/www.conf + /etc/php82/php-fpm.d/www.conf -sudo -Eu app php81 $DST_DIR/update.php --update-schema=force-yes +sudo -Eu app php82 $DST_DIR/update.php --update-schema=force-yes if [ ! -z "$ADMIN_USER_PASS" ]; then - sudo -Eu app php81 $DST_DIR/update.php --user-set-password "admin:$ADMIN_USER_PASS" + sudo -Eu app php82 $DST_DIR/update.php --user-set-password "admin:$ADMIN_USER_PASS" else - if sudo -Eu app php81 $DST_DIR/update.php --user-check-password "admin:password"; then + if sudo -Eu app php82 $DST_DIR/update.php --user-check-password "admin:password"; then RANDOM_PASS=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 16 ; echo '') echo "*****************************************************************************" @@ -128,17 +128,17 @@ else echo "* If you want to set it manually, use ADMIN_USER_PASS environment variable. *" echo "*****************************************************************************" - sudo -Eu app php81 $DST_DIR/update.php --user-set-password "admin:$RANDOM_PASS" + sudo -Eu app php82 $DST_DIR/update.php --user-set-password "admin:$RANDOM_PASS" fi fi if [ ! -z "$ADMIN_USER_ACCESS_LEVEL" ]; then - sudo -Eu app php81 $DST_DIR/update.php --user-set-access-level "admin:$ADMIN_USER_ACCESS_LEVEL" + sudo -Eu app php82 $DST_DIR/update.php --user-set-access-level "admin:$ADMIN_USER_ACCESS_LEVEL" fi if [ ! -z "$AUTO_CREATE_USER" ]; then - sudo -Eu app /bin/sh -c "php81 $DST_DIR/update.php --user-exists $AUTO_CREATE_USER || - php81 $DST_DIR/update.php --force-yes --user-add \"$AUTO_CREATE_USER:$AUTO_CREATE_USER_PASS:$AUTO_CREATE_USER_ACCESS_LEVEL\"" + sudo -Eu app /bin/sh -c "php82 $DST_DIR/update.php --user-exists $AUTO_CREATE_USER || + php82 $DST_DIR/update.php --force-yes --user-add \"$AUTO_CREATE_USER:$AUTO_CREATE_USER_PASS:$AUTO_CREATE_USER_ACCESS_LEVEL\"" fi rm -f /tmp/error.log && mkfifo /tmp/error.log && chown app:app /tmp/error.log @@ -150,4 +150,4 @@ unset AUTO_CREATE_USER_PASS touch $DST_DIR/.app_is_ready -exec /usr/sbin/php-fpm81 --nodaemonize --force-stderr +exec /usr/sbin/php-fpm82 --nodaemonize --force-stderr diff --git a/.docker/app/updater.sh b/.docker/app/updater.sh index 219041a59..1f5432980 100644 --- a/.docker/app/updater.sh +++ b/.docker/app/updater.sh @@ -21,7 +21,7 @@ while ! pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER; do done sed -i.bak "s/^\(memory_limit\) = \(.*\)/\1 = ${PHP_WORKER_MEMORY_LIMIT}/" \ - /etc/php81/php.ini + /etc/php82/php.ini DST_DIR=/var/www/html/tt-rss @@ -30,4 +30,4 @@ while [ ! -s $DST_DIR/config.php -a -e $DST_DIR/.app_is_ready ]; do sleep 3 done -sudo -E -u app /usr/bin/php81 /var/www/html/tt-rss/update_daemon2.php +sudo -E -u app /usr/bin/php82 /var/www/html/tt-rss/update_daemon2.php |