add php 8.3

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2024-01-08 11:08:20 +01:00
parent 711d378baa
commit 16ff4c4db9
9 changed files with 94 additions and 22 deletions

View File

@@ -1,4 +0,0 @@
#!/bin/sh
while [ "$(healthcheck.sh)" != "OK" ]; do sleep 10s; done
certbot --logs-dir /tmp/certbot-log --work-dir /tmp/certbot-work --config-dir /data/tls/certbot renew --quiet --config "/data/tls/certbot/config.ini" --preferred-challenges "dns,http" --no-random-sleep-on-renew

View File

@@ -16,7 +16,7 @@ if [ "$NPM_IPV6_BINDING" != "[::]" ] && [ "$NPM_IPV4_BINDING" != "0.0.0.0" ]; th
fi
fi
if (if [ "$PHP81" = true ]; then cgi-fcgi -bind -connect /dev/php81.sock > /dev/null 2>&1; fi && if [ "$PHP82" = true ]; then cgi-fcgi -bind -connect /dev/php82.sock > /dev/null 2>&1; fi && [ "$(curl -sk https://"$HC_IP":"$NPM_PORT"/api/ | jq --raw-output .status)" = "OK" ]); then
if (if [ "$PHP81" = true ]; then cgi-fcgi -bind -connect /dev/php81.sock > /dev/null 2>&1; fi && if [ "$PHP82" = true ]; then cgi-fcgi -bind -connect /dev/php82.sock > /dev/null 2>&1; fi && if [ "$PHP83" = true ]; then cgi-fcgi -bind -connect /dev/php83.sock > /dev/null 2>&1; fi && [ "$(curl -sk https://"$HC_IP":"$NPM_PORT"/api/ | jq --raw-output .status)" = "OK" ]); then
echo "OK"
exit 0
else

View File

@@ -36,8 +36,15 @@ if [ "$PHP82" = "true" ]; then
fi
fi
if [ "$PHP83" = "true" ]; then
if ! PHP_INI_SCAN_DIR=/data/php/83/conf.d php-fpm83 -c /data/php/83 -y /data/php/83/php-fpm.conf -FORt > /dev/null 2>&1; then
PHP_INI_SCAN_DIR=/data/php/83/conf.d php-fpm83 -c /data/php/83 -y /data/php/83/php-fpm.conf -FORt
sleep inf
fi
fi
if [ "$PHP81" = "true" ]; then PHP_INI_SCAN_DIR=/data/php/81/conf.d php-fpm81 -c /data/php/81 -y /data/php/81/php-fpm.conf -FOR; fi &
if [ "$PHP82" = "true" ]; then PHP_INI_SCAN_DIR=/data/php/82/conf.d php-fpm82 -c /data/php/82 -y /data/php/82/php-fpm.conf -FOR; fi &
cbr.sh &
if [ "$PHP83" = "true" ]; then PHP_INI_SCAN_DIR=/data/php/83/conf.d php-fpm83 -c /data/php/83 -y /data/php/83/php-fpm.conf -FOR; fi &
aio.sh &
index.js

View File

@@ -152,13 +152,9 @@ if [ "$NPM_LISTEN_LOCALHOST" = "true" ]; then
fi
if [ "$PHP81" = "true" ] || [ "$PHP82" = "true" ]; then
apk add --no-cache fcgi
fi
if [ "$PHP81" = "true" ]; then
apk add --no-cache php81-fpm
apk add --no-cache php81-fpm
# From https://github.com/nextcloud/all-in-one/pull/1377/files
if [ -n "$PHP81_APKS" ]; then
@@ -190,7 +186,7 @@ fi
if [ "$PHP82" = "true" ]; then
apk add --no-cache php82-fpm
apk add --no-cache php82-fpm
# From https://github.com/nextcloud/all-in-one/pull/1377/files
if [ -n "$PHP82_APKS" ]; then
@@ -220,6 +216,63 @@ elif [ "$FULLCLEAN" = "true" ]; then
rm -vrf /data/php/82
fi
if [ "$PHP83" = "true" ]; then
apk add --no-cache php83-fpm
# From https://github.com/nextcloud/all-in-one/pull/1377/files
if [ -n "$PHP83_APKS" ]; then
for apk in $(echo "$PHP83_APKS" | tr " " "\n"); do
if ! echo "$apk" | grep -q "^php83-.*$"; then
echo "$apk is a non allowed value."
echo "It needs to start with \"php83-\"."
echo "It is set to \"$apk\"."
sleep inf
fi
echo "Installing $apk via apk..."
if ! apk add --no-cache "$apk" > /dev/null 2>&1; then
echo "The apk \"$apk\" was not installed!"
fi
done
fi
mkdir -vp /data/php
cp -vrnT /etc/php83 /data/php/83
sed -i "s|listen =.*|listen = /run/php83.sock|" /data/php/83/php-fpm.d/www.conf
sed -i "s|include=.*|include=/data/php/83/php-fpm.d/*.conf|g" /data/php/83/php-fpm.conf
elif [ "$FULLCLEAN" = "true" ]; then
rm -vrf /data/php/83
fi
if [ "$PHP81" = "true" ] || [ "$PHP82" = "true" ] || [ "$PHP83" = "true" ]; then
apk add --no-cache fcgi
# From https://github.com/nextcloud/all-in-one/pull/1377/files
if [ -n "$PHP_APKS" ]; then
for apk in $(echo "$PHP_APKS" | tr " " "\n"); do
if ! echo "$apk" | grep -q "^php-.*$"; then
echo "$apk is a non allowed value."
echo "It needs to start with \"php-\"."
echo "It is set to \"$apk\"."
sleep inf
fi
echo "Installing $apk via apk..."
if ! apk add --no-cache "$apk" > /dev/null 2>&1; then
echo "The apk \"$apk\" was not installed!"
fi
done
fi
fi
mkdir -p /tmp/acme-challenge \
/tmp/certbot-work \
/tmp/certbot-log \
@@ -320,7 +373,7 @@ if [ -s "$DB_SQLITE_FILE" ]; then
fi
if [ "$FULLCLEAN" = "true" ]; then
if [ "$PHP81" != "true" ] && [ "$PHP82" != "true" ]; then
if [ "$PHP81" != "true" ] && [ "$PHP82" != "true" ] && [ "$PHP83" != "true" ]; then
rm -vrf /data/php
fi
fi
@@ -652,6 +705,10 @@ if [ "$PUID" != "0" ]; then
sed -i "s|user =.*|;user = root|" /data/php/82/php-fpm.d/www.conf
sed -i "s|group =.*|;group = root|" /data/php/82/php-fpm.d/www.conf
fi
if [ "$PHP83" = "true" ]; then
sed -i "s|user =.*|;user = root|" /data/php/83/php-fpm.d/www.conf
sed -i "s|group =.*|;group = root|" /data/php/83/php-fpm.d/www.conf
fi
sed -i "s|user root;|#user root;|g" /usr/local/nginx/conf/nginx.conf
sudo -Eu npm launch.sh
else
@@ -668,6 +725,10 @@ else
sed -i "s|;user =.*|user = root|" /data/php/82/php-fpm.d/www.conf
sed -i "s|;group =.*|group = root|" /data/php/82/php-fpm.d/www.conf
fi
if [ "$PHP83" = "true" ]; then
sed -i "s|;user =.*|user = root|" /data/php/83/php-fpm.d/www.conf
sed -i "s|;group =.*|group = root|" /data/php/83/php-fpm.d/www.conf
fi
sed -i "s|#user root;|user root;|g" /usr/local/nginx/conf/nginx.conf
launch.sh
fi

View File

@@ -81,6 +81,10 @@ http {
server unix:/run/php82.sock;
}
upstream php83 {
server unix:/run/php83.sock;
}
# Fancy Index
fancyindex on;
fancyindex_localtime on;