Created
March 7, 2018 12:09
-
-
Save RobDWaller/a0b62288358dfb4bfd0b2e64ca9d3362 to your computer and use it in GitHub Desktop.
Scotch/Box 3.0 Vagrant Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<SCRIPT | |
# Remove Broken Old PHP Repo | |
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list | |
# Install PHP 7.1 | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install -y php7.1 php7.1-xml php7.1-mysql php7.1-curl php7.1-mbstring | |
# Disable PHP 7.0 and enable PHP 7.1 | |
sudo a2dismod php7.0 | |
sudo a2enmod php7.1 | |
sudo service apache2 restart | |
# Update Composer | |
sudo /usr/local/bin/composer self-update | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.box = "scotch/box" | |
config.vm.network "private_network", ip: "192.168.88.77" | |
config.vm.hostname = "scotchbox" | |
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=777"] | |
# Optional NFS. Make sure to remove other synced_folder line too | |
#config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] } | |
config.vm.provision "shell", inline: $script | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment