Update Vagrantfile to Ubuntu 20.04

This commit is contained in:
Julien ANNE 2020-05-21 03:10:53 +02:00 committed by GitHub
parent 31508e07fd
commit 6ffe3ed1ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 9 deletions

14
Vagrantfile vendored
View File

@ -1,8 +1,8 @@
$script = <<SCRIPT
apt-get update
apt-get install -y apache2 libapache2-mod-php7.0 php7.0-cli php7.0-mbstring php7.0-sqlite3 php7.0-zip \
php7.0-opcache php7.0-json php7.0-mysql php7.0-pgsql php7.0-ldap php7.0-gd php7.0-xml php7.0-curl && \
apt-get install -y apache2 libapache2-mod-php7.4 php7.4-cli php7.4-mbstring php7.4-sqlite3 php7.4-zip \
php7.4-opcache php7.4-json php7.4-mysql php7.4-pgsql php7.4-ldap php7.4-gd php7.4-xml php7.4-curl && \
apt-get clean && \
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
sed -ri 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf && \
@ -13,20 +13,16 @@ service apache2 restart
rm -f /var/www/html/index.html
date > /etc/vagrant_provisioned_at
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
cd /var/www/html && composer install
wget -q -O phpunit https://phar.phpunit.de/phpunit-5.phar
chmod +x phpunit
sudo mv phpunit /usr/local/bin/phpunit
SCRIPT
Vagrant.configure("2") do |config|
config.vm.boot_timeout = 1200
config.vm.define "ubuntu" do |m|
m.vm.box = "ubuntu/xenial64"
m.vm.box = "ubuntu/focal64"
m.vm.provision "shell", inline: $script
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
m.vm.network :forwarded_port, guest: 80, host: 8001