Skip to content

Instantly share code, notes, and snippets.

@viccherubini
Last active December 27, 2015 06:59
Show Gist options
  • Save viccherubini/7285990 to your computer and use it in GitHub Desktop.
Save viccherubini/7285990 to your computer and use it in GitHub Desktop.
Expert PHP Deployments Vagrantfile
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
config.vm.provision :shell, :path => "config/vagrant-bootstrap.sh"
# Create a forwarded port mapping.
config.vm.network :forwarded_port, guest: 8000, host: 8000, auto_correct: true
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# Ignore for Windows.
config.vm.network :private_network, ip: "192.168.100.100"
# Share an additional folder to the guest VM.
# Remove , :nfs => true if using Windows.
config.vm.synced_folder ".", "/var/apps/expert-php-applications", :nfs => true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", "1024"]
v.customize ["modifyvm", :id, "--cpus", "8"]
v.customize ["modifyvm", :id, "--cpuexecutioncap", "100"]
v.customize ["modifyvm", :id, "--hwvirtex", "on"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment