Skip to content

Instantly share code, notes, and snippets.

@aackerman
Created August 22, 2016 23:39
Show Gist options
  • Save aackerman/5515cd031f7d42d4f9d3e72b2d026a1d to your computer and use it in GitHub Desktop.
Save aackerman/5515cd031f7d42d4f9d3e72b2d026a1d to your computer and use it in GitHub Desktop.
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network :forwarded_port, guest: 8000, host: 8000
config.vm.network :forwarded_port, guest: 5432, host: 5432
config.vm.network :forwarded_port, guest: 5858, host: 5858
config.vm.network :forwarded_port, guest: 8080, host: 8080
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# VirtualBox:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", 4096]
vb.customize ["modifyvm", :id, "--cpus", 2]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
# Use ssh from host
config.ssh.forward_agent = true
config.ssh.insert_key = false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment