Skip to content

Instantly share code, notes, and snippets.

@noahmiller
Created September 13, 2013 15:56
Show Gist options
  • Save noahmiller/6552543 to your computer and use it in GitHub Desktop.
Save noahmiller/6552543 to your computer and use it in GitHub Desktop.
Example Vagrantfile
# -*- mode: ruby -*-
# Vagrant file for the lolcats website
Vagrant.configure("2") do |config|
config.vm.hostname = "lolcats"
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.network :forwarded_port, guest: 80, host: 8000 # web server
# Private network address. If this isn't specified, the machine will
# be assigned a private IP address.
config.vm.network :private_network, ip: "172.16.147.200"
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.synced_folder "../lolcats/source", "/home/vagrant/lolcats"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment