Vagrantfile exampleΒΆ

Create in directory file Vagrantfile:

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

# 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|
  # Box name
  config.vm.box = "hashicorp/precise64"

  # Provision file. Exec in shell.
  config.vm.provision :shell, path: "bootstrap.sh"

  # Port-forwarding
  config.vm.network :forwarded_port, guest: 80, host: 4567

  # Sync folder
  config.vm.synced_folder "site/", "/var/www/html/", owner: "root", group: "root"
  # disable sync
  config.vm.synced_folder ".", "/vagrant", disabled: true

  config.vm.provider "virtualbox" do |v|
    v.gui = true            # gui or headless
        v.name = my_vm      # name of vm
    v.cpus = 1
        v.memory = 512
  end
end