# -*- mode: ruby -*-
# vi: set ft=ruby :

# Customization parameters
NAME='magento-devdocs'
HOST_PORT='4000'
RAM='1024'
CPU='50'

# All Vagrant configuration is done below. The '2' in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|

  # Create a virtual machine with Official Ubuntu Server 14.04 LTS (Trusty Tahr) build.
  config.vm.box = 'ubuntu/trusty64'

  # Set a name for the host on the created virtual machine. NAME must be set as a customisation parameter on top of this file.
  config.vm.hostname = NAME

  # Set a provisioner and file with provision to automate software installation.
  config.vm.provision :shell, path: 'bootstrap.sh'

  # Jekyll uses the 4000 port by default. This declaration forwards output from the 4000 port on VM to the port on your host that is set in Customization parameters as HOST_PORT on top of the file.
  config.vm.network :forwarded_port, guest: '4000', host: HOST_PORT

  # VirtualBox specific configuration settings.
  config.vm.provider 'virtualbox' do |v|
    v.customize ['modifyvm', :id, '--name', NAME, '--memory', RAM, '--cpuexecutioncap', CPU]
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
  end

end