Skip to content

Instantly share code, notes, and snippets.

@whatnickcodes
Created April 2, 2018 15:10
Show Gist options
  • Save whatnickcodes/914e0d5c7cb000433f4a2c4989dba4dc to your computer and use it in GitHub Desktop.
Save whatnickcodes/914e0d5c7cb000433f4a2c4989dba4dc to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get -y install php7.1 php7.1-mbstring php7.1-curl php7.1-dom php7.1-mysql php7.1-gd php7.1-zip
sudo a2dismod php5
sudo a2enmod php7.1
sudo service apache2 restart
composer self-update
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit
cd /var/www
#php artisan migrate:refresh --seed
mysql --user=root --password=root scotchbox < /var/www/database/db-sample-new.sql
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.50.4"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
config.vm.provision "shell", inline: $script
# Optional NFS. Make sure to remove other synced_folder line too
#config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment