diff --git a/Vagrantfile b/Vagrantfile index 73a04c7..d752f5b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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'] diff --git a/vagrant/nginx/app.conf b/vagrant/nginx/app.conf index b22e661..1bfc0d5 100644 --- a/vagrant/nginx/app.conf +++ b/vagrant/nginx/app.conf @@ -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.2-fpm.sock; try_files $uri =404; } diff --git a/vagrant/provision/always-as-root.sh b/vagrant/provision/always-as-root.sh index e5d8e33..17fb584 100644 --- a/vagrant/provision/always-as-root.sh +++ b/vagrant/provision/always-as-root.sh @@ -13,6 +13,6 @@ function info { info "Provision-script user: `whoami`" info "Restart web-stack" -service php7.0-fpm restart +service php7.2-fpm restart service nginx restart -service mysql restart \ No newline at end of file +service mysql restart diff --git a/vagrant/provision/once-as-root.sh b/vagrant/provision/once-as-root.sh index 689a7af..75cbf5a 100644 --- a/vagrant/provision/once-as-root.sh +++ b/vagrant/provision/once-as-root.sh @@ -35,7 +35,7 @@ apt-get update apt-get upgrade -y 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 mariadb-server-10.0 php.xdebug +apt-get install -y php7.2-curl php7.2-cli php7.2-intl php7.2-mysqlnd php7.2-gd php7.2-fpm php7.2-mbstring php7.2-xml unzip nginx mariadb-server-10.1 php.xdebug info "Configure MySQL" sed -i 's/.*bind-address.*/bind-address = 0.0.0.0/' /etc/mysql/mariadb.conf.d/50-server.cnf @@ -46,10 +46,10 @@ mysql <<< '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.2/fpm/pool.d/www.conf +sed -i 's/group = www-data/group = vagrant/g' /etc/php/7.2/fpm/pool.d/www.conf +sed -i 's/owner = www-data/owner = vagrant/g' /etc/php/7.2/fpm/pool.d/www.conf +cat << EOF > /etc/php/7.2/mods-available/xdebug.ini zend_extension=xdebug.so xdebug.remote_enable=1 xdebug.remote_connect_back=1 @@ -76,4 +76,4 @@ mysql <<< 'CREATE DATABASE yii2basic_test' echo "Done!" info "Install composer" -curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ No newline at end of file +curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer