Skip to content

Instantly share code, notes, and snippets.

@evdb
Created September 4, 2013 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evdb/6436931 to your computer and use it in GitHub Desktop.
Save evdb/6436931 to your computer and use it in GitHub Desktop.
FMS vagrant file intended to be copied and used before cloning repo
# -*- mode: ruby -*-
# vi: set ft=ruby :
# 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|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# 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"
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
# 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: 3000, host: 3000
# Enable the creating of symlinks on the default shared folder
# Needs to be explicitly enabled because virtualbox disables this
# feature by default because it breaks NFS shares in some wayvag
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
# Provision using the shell provisioner
config.vm.provision :shell,
:inline => "apt-get install -y curl; curl https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh | sudo sh -s fixmystreet vagrant fixmystreet.127.0.0.1.xip.io"
# make the installed code available locally
config.vm.synced_folder "fixmystreet.127.0.0.1.xip.io", "/var/www/fixmystreet.127.0.0.1.xip.io", :create => true;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment