Last active
August 29, 2015 14:23
-
-
Save larsbutler/96fb9331fd5d60b75d03 to your computer and use it in GitHub Desktop.
Vagrantfile template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
# TODO: Put your install script here. | |
SCRIPT | |
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. | |
# Official boxes are here: https://atlas.hashicorp.com/boxes/search | |
# Additional boxes here: http://www.vagrantbox.es/ | |
config.vm.box = "ubuntu/trusty64" | |
#config.vm.box = "hashicorp/precise64" | |
# You can shell scripts when `vagrant up` or `vagrant provision` is run. | |
# Just put scripts in the same directory as this `Vagrantfile`. | |
#config.vm.provision "shell", privileged: false, path: "vagrant-bootstrap.sh" | |
# You can do multiple scripts, if you want: | |
#config.vm.provision "shell", privileged: false, path: "vagrant-bootstrap2.sh" | |
config.vm.provision "shell", privileged: true, inline: $script | |
# Port forwarding examples | |
# Just in case you need to run a database server, web server, etc. | |
#config.vm.network "forwarded_port", guest: 8080, host: 8080 | |
#config.vm.network "forwarded_port", guest: 5000, host: 5000 | |
#config.vm.network "forwarded_port", guest: 35357, host: 35357 | |
# Mem/cpu config example. | |
# If you need more CPUs/RAM, uncomment the next 4 lines and edit as needed. | |
#config.vm.provider "virtualbox" do |v| | |
# v.memory = 1024 | |
# v.cpus = 2 | |
#end | |
# Shared folders: | |
# | |
# Setting the workspace to the current dir allows you to do editing/ | |
# development on host environment (OSX, etc.) and then actually run/ | |
# test things inside the virtual environvment. | |
# You can map multiple folders in this way. | |
# In this case, the ".", "/workspace" indicates that we want to map | |
# the current directory on the host machine to the "/workspace" directory | |
# on the guest/VM. | |
#config.vm.synced_folder ".", "/proj" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment