Last active
March 19, 2018 13:10
-
-
Save plainspooky/ba7518003a5cdeb5b0f19ce687bf0419 to your computer and use it in GitHub Desktop.
Vagrantfile to setup a Laravel environment on virtual machine running Ubuntu 17.10
This file contains hidden or 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
#!/usr/bin/env bash | |
LARAVEL=~/.config/composer/vendor/laravel/installer/laravel | |
composer global require laravel/installer | |
if [[ -f ${LARAVEL} ]]; then | |
[[ ! -d ~/bin ]] && mkdir ~/bin | |
[[ -f laravel ]] && rm -f ~/bin/laravel | |
ln -sf ${LARAVEL} ~/bin | |
exit 0 | |
fi |
This file contains hidden or 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
#!/usr/bin/env bash | |
apt-get update &&\ | |
apt-get --yes install composer php7.1 php7.1-bz2 php7.1-mbstring php7.1-zip php-fdomdocument |
This file contains hidden or 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
#!/usr/bin/env bash | |
apt-get update &&\ | |
apt-get --yes dist-upgrade &&\ | |
apt-get --yes --purge autoremove |
This file contains hidden or 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 : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/artful64" | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "512"] | |
vb.customize ["modifyvm", :id, "--cpus", "2"] | |
end | |
config.vm.network "forwarded_port", guest: 8000, host: 8000 | |
config.vm.provision "shell", path:"./software_update.sh" | |
config.vm.provision "shell", path:"./php7_install.sh" | |
config.vm.provision "shell", path:"./laravel_install.sh", privileged:false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment