Update vagrant to php8 and grav to 1.7.24 (#268)
In order to better match with what is on prod. Co-authored-by: meaz <meaz@disroot.org> Reviewed-on: #268 Reviewed-by: antilopa <antilopa@no-reply@disroot.org> Co-authored-by: meaz <meaz@no-reply@disroot.org> Co-committed-by: meaz <meaz@no-reply@disroot.org>
This commit is contained in:
parent
e6362f77f5
commit
f80aea0c11
|
@ -5,7 +5,7 @@ WEB_NAME="disroot.lan"
|
||||||
WEB_ROOT="/var/www/"
|
WEB_ROOT="/var/www/"
|
||||||
WWW_USER="www-data"
|
WWW_USER="www-data"
|
||||||
YAML="/var/www/disroot.lan/user/config/system.yaml"
|
YAML="/var/www/disroot.lan/user/config/system.yaml"
|
||||||
GRAV_VERSION="1.7.21"
|
GRAV_VERSION="1.7.24"
|
||||||
|
|
||||||
# Provisioning actions
|
# Provisioning actions
|
||||||
apt install dialog
|
apt install dialog
|
||||||
|
@ -14,7 +14,7 @@ apt install dialog
|
||||||
sudo debconf-set-selections <<< "postfix postfix/main_mailer_type select No configuration"
|
sudo debconf-set-selections <<< "postfix postfix/main_mailer_type select No configuration"
|
||||||
sudo debconf-set-selections <<< "postfix postfix/mailname string ${WEB_NAME}"
|
sudo debconf-set-selections <<< "postfix postfix/mailname string ${WEB_NAME}"
|
||||||
|
|
||||||
# Add sury repository to sources.list for PHP7.4
|
# Add sury repository to sources.list for php8.0
|
||||||
echo "set grub-pc/install_devices /dev/sda" | debconf-communicate # Fix grub error
|
echo "set grub-pc/install_devices /dev/sda" | debconf-communicate # Fix grub error
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get -y dist-upgrade
|
sudo apt-get -y dist-upgrade
|
||||||
|
@ -23,7 +23,7 @@ if ! grep -q "^deb .*sury" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
|
||||||
sudo sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
|
sudo sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sury Key for PHP7.4
|
# Sury Key for php8.0
|
||||||
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
|
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ sudo apt-get install -y nginx-full
|
||||||
echo "Installing composer..."
|
echo "Installing composer..."
|
||||||
sudo apt-get install -y composer
|
sudo apt-get install -y composer
|
||||||
|
|
||||||
echo "Installing php7..."
|
echo "Installing php8.0..."
|
||||||
sudo apt-get install -y php7.4-zip php7.4-cli php7.4-curl php7.4-gd php7.4-mbstring php7.4-xml php7.4-fpm
|
sudo apt-get install -y php8.0 php8.0-zip php8.0-cli php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-fpm
|
||||||
|
|
||||||
# Create the Nginx config files and restart webserver
|
# Create the Nginx config files and restart webserver
|
||||||
echo "Installing Nginx config files..."
|
echo "Installing Nginx config files..."
|
||||||
|
@ -89,13 +89,13 @@ fi
|
||||||
echo "Enter git"
|
echo "Enter git"
|
||||||
cd "${WEB_ROOT}""${WEB_NAME}"
|
cd "${WEB_ROOT}""${WEB_NAME}"
|
||||||
|
|
||||||
sudo -u "${WWW_USER}" php7.4 bin/gpm install themer
|
yes | sudo -u "${WWW_USER}" php8.0 bin/gpm install themer
|
||||||
# https://github.com/sommerregen/grav-plugin-themer
|
# https://github.com/sommerregen/grav-plugin-themer
|
||||||
|
|
||||||
sudo -u "${WWW_USER}" php7.4 bin/gpm install tagcloud
|
yes | sudo -u "${WWW_USER}" php8.0 bin/gpm install tagcloud
|
||||||
# https://github.com/Perlkonig/grav-plugin-tagcloud
|
# https://github.com/Perlkonig/grav-plugin-tagcloud
|
||||||
|
|
||||||
sudo -u "${WWW_USER}" php7.4 bin/gpm install form
|
yes | sudo -u "${WWW_USER}" php8.0 bin/gpm install form
|
||||||
sudo -u "${WWW_USER}" sed -i 's/quark/disroot/g' "${YAML}"
|
sudo -u "${WWW_USER}" sed -i 's/quark/disroot/g' "${YAML}"
|
||||||
|
|
||||||
# Add Grav config (the second extra false should be set to true, but it creates an error in Grav ("Trying to access array offset on value of type null")
|
# Add Grav config (the second extra false should be set to true, but it creates an error in Grav ("Trying to access array offset on value of type null")
|
||||||
|
|
|
@ -29,7 +29,7 @@ server {
|
||||||
location ~ /(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) { return 403; }
|
location ~ /(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) { return 403; }
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|
Loading…
Reference in New Issue