]> jfr.im git - irc/UndernetIRC/cservice-web.git/commitdiff
chore: update php to verion 8.2
authorStefan Wold <redacted>
Sat, 11 Feb 2023 14:25:50 +0000 (15:25 +0100)
committerStefan Wold <redacted>
Sat, 11 Feb 2023 14:25:50 +0000 (15:25 +0100)
Dockerfile
docker-compose.yml
docker-entrypoint.sh

index 42167a0d92a518a37e6703a96971136b469ffde6..231bdf328cac0c90281a987c537833c114a71a3d 100644 (file)
@@ -1,62 +1,58 @@
-FROM alpine:3.10
+FROM alpine:3.17
 MAINTAINER ratler@undernet.org
 
 ENV PYTHONUNBUFFERED 1
 
 RUN apk --no-cache update && apk --no-cache upgrade && \
-    apk --no-cache add \
+    apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community add \
     bash \
     busybox-extras \
     apache2 \
-    php7-apache2 \
+    php82-apache2 \
     curl \
     ca-certificates \
     openssl \
     openssh \
     git \
-    php7 \
+    php82 \
     python3 \
     tzdata
 
-RUN apk --no-cache add \
-    php7-phar \
-    php7-json \
-    php7-iconv \
-    php7-openssl \
-    php7-xdebug \
-    php7-mcrypt \
-    php7-mbstring \
-    php7-soap \
-    php7-gmp \
-    php7-pdo_odbc \
-    php7-dom \
-    php7-pdo \
-    php7-zip \
-    php7-sqlite3 \
-    php7-pgsql \
-    php7-pdo_pgsql \
-    php7-bcmath \
-    php7-gd \
-    php7-odbc \
-    php7-gettext \
-    php7-xml \
-    php7-xmlreader \
-    php7-xmlwriter \
-    php7-tokenizer \
-    php7-xmlrpc \
-    php7-bz2 \
-    php7-pdo_dblib \
-    php7-curl \
-    php7-ctype \
-    php7-session \
-    php7-exif \
-    php7-intl \
-    php7-fileinfo \
-    php7-apcu \
-    php7-simplexml
-
-# Composer
-RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
+RUN apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community add \
+    php82-phar \
+    php82-json \
+    php82-iconv \
+    php82-openssl \
+    php82-xdebug \
+    php82-mbstring \
+    php82-soap \
+    php82-gmp \
+    php82-pdo_odbc \
+    php82-dom \
+    php82-pdo \
+    php82-zip \
+    php82-sqlite3 \
+    php82-pgsql \
+    php82-pdo_pgsql \
+    php82-bcmath \
+    php82-gd \
+    php82-odbc \
+    php82-gettext \
+    php82-xml \
+    php82-xmlreader \
+    php82-xmlwriter \
+    php82-tokenizer \
+    php82-bz2 \
+    php82-pdo_dblib \
+    php82-curl \
+    php82-ctype \
+    php82-session \
+    php82-exif \
+    php82-intl \
+    php82-fileinfo \
+    php82-apcu \
+    php82-simplexml \
+    composer
 
 # Setup apache
 RUN for m in rewrite_module session_module session_cookie_module ession_crypto_module deflate_module; do \
index b235b89aac450c60474c54db019bd987eda781c6..4015aa0cbfcf795ac4ada3c44b7eeffad0434448 100644 (file)
@@ -6,7 +6,7 @@ services:
       - "8080:80"
     environment:
       - PHP_SHORT_OPEN_TAG=On
-      - APACHE_ERRORLOG=/dev/stderr
+      - APACHE_ERRORLOG=/dev/stdout
       - LOCALDB_USER=cservice
       - LOCALDB_PASS=cservice
       - LOCALDB_HOST=db
@@ -15,7 +15,7 @@ services:
       - REMOTEDB_PASS=cservice
       - REMOTEDB_HOST=db
       - ENABLE_REGISTER_GLOBALS=1
-      - LOG_LEVEL=Logger::DEBUG
+      - LOG_LEVEL=debug
       - LOG_STREAM_HANDLER=php://stdout
       - SMTPHOST=mailhog:1025
     volumes:
index 9a1268cf6aab69604fec231ea99acebd4ca2f9f0..e59d716b517218b9db0e519c47d962cee87cc0bf 100755 (executable)
@@ -2,19 +2,21 @@
 
 if [ "$1" == "httpd" ]; then
   if [ ! -z "$PHP_SHORT_OPEN_TAG" ]; then
-    sed -i "s/\;\?\\s\?short_open_tag = .*/short_open_tag = $PHP_SHORT_OPEN_TAG/" /etc/php7/php.ini
+    sed -i "s/\;\?\\s\?short_open_tag = .*/short_open_tag = $PHP_SHORT_OPEN_TAG/" /etc/php82/php.ini
     echo "Set PHP short_open_tag = $PHP_SHORT_OPEN_TAG..."
   fi
   if [ ! -z "$PHP_POST_MAX_SIZE" ]; then
-    sed -i "s/\;\?\\s\?post_max_size = .*/post_max_size = $PHP_POST_MAX_SIZE/" /etc/php7/php.ini
+    sed -i "s/\;\?\\s\?post_max_size = .*/post_max_size = $PHP_POST_MAX_SIZE/" /etc/php82/php.ini
     echo "Set PHP post_max_size = $PHP_POST_MAX_SIZE..."
   fi
   if [ ! -z "$APACHE_ERRORLOG" ]; then
     sed -i "s;^ErrorLog.*;ErrorLog $APACHE_ERRORLOG;" /etc/apache2/httpd.conf
     echo "Set Apache ErrorLog to $APACHE_ERRORLOG..."
+    sed -i "s;^LogLevel.*;LogLevel error;" /etc/apache2/httpd.conf
+    echo "Set Apache LogLevel to error..."
   fi
 
-  sed -i "s;\;sendmail_path.*;sendmail_path = /usr/sbin/sendmail;" /etc/php7/php.ini
+  sed -i "s;\;sendmail_path.*;sendmail_path = /usr/sbin/sendmail;" /etc/php82/php.ini
 
   # Setup default config for cservice website
   if [ ! -f "/app/php_includes/cmaster.inc" ]; then