Skip to content

Commit

Permalink
Fix #502: Update php and ubuntu version in vagrant stack (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
ditibal committed Aug 15, 2021
1 parent 30b48bf commit a62dee6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Expand Up @@ -41,7 +41,7 @@ end
# vagrant configurate
Vagrant.configure(2) do |config|
# select the box
config.vm.box = 'bento/ubuntu-16.04'
config.vm.box = 'bento/ubuntu-18.04'

# should we ask about box updates?
config.vm.box_check_update = options['box_check_update']
Expand Down
4 changes: 2 additions & 2 deletions vagrant/nginx/app.conf
Expand Up @@ -28,7 +28,7 @@ server {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
try_files $uri =404;
}

Expand Down Expand Up @@ -67,7 +67,7 @@ server {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
try_files $uri =404;
}

Expand Down
2 changes: 1 addition & 1 deletion vagrant/provision/always-as-root.sh
Expand Up @@ -7,6 +7,6 @@ source /app/vagrant/provision/common.sh
info "Provision-script user: `whoami`"

info "Restart web-stack"
service php7.0-fpm restart
service php7.4-fpm restart
service nginx restart
service mysql restart
15 changes: 10 additions & 5 deletions vagrant/provision/once-as-root.sh
Expand Up @@ -28,8 +28,13 @@ info "Update OS software"
apt-get update
apt-get upgrade -y
info "Add ppa:ondrej/php"
apt-get install -y python-software-properties
apt-get update && apt-get upgrade -y
add-apt-repository -y ppa:ondrej/php
info "Install additional software"
apt-get install -y php7.0-curl php7.0-cli php7.0-intl php7.0-mysqlnd php7.0-gd php7.0-fpm php7.0-mbstring php7.0-xml unzip nginx mysql-server-5.7 php.xdebug
apt-get install -y php7.4-curl php7.4-cli php7.4-intl php7.4-mysqlnd php7.4-gd php7.4-fpm php7.4-mbstring php7.4-xml unzip nginx mysql-server-5.7 php7.4-xdebug
info "Configure MySQL"
sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
Expand All @@ -40,10 +45,10 @@ mysql -uroot <<< "FLUSH PRIVILEGES"
echo "Done!"
info "Configure PHP-FPM"
sed -i 's/user = www-data/user = vagrant/g' /etc/php/7.0/fpm/pool.d/www.conf
sed -i 's/group = www-data/group = vagrant/g' /etc/php/7.0/fpm/pool.d/www.conf
sed -i 's/owner = www-data/owner = vagrant/g' /etc/php/7.0/fpm/pool.d/www.conf
cat << EOF > /etc/php/7.0/mods-available/xdebug.ini
sed -i 's/user = www-data/user = vagrant/g' /etc/php/7.4/fpm/pool.d/www.conf
sed -i 's/group = www-data/group = vagrant/g' /etc/php/7.4/fpm/pool.d/www.conf
sed -i 's/owner = www-data/owner = vagrant/g' /etc/php/7.4/fpm/pool.d/www.conf
cat << EOF > /etc/php/7.4/mods-available/xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
Expand Down

0 comments on commit a62dee6

Please sign in to comment.