Skip to content

Instantly share code, notes, and snippets.

@thuongdinh-agilityio
Last active December 9, 2015 14:58
Show Gist options
  • Save thuongdinh-agilityio/f951138e105120a309bb to your computer and use it in GitHub Desktop.
Save thuongdinh-agilityio/f951138e105120a309bb to your computer and use it in GitHub Desktop.
Simple Vagrantfile for development
#!/bin/bash
# Upgrade system
sudo apt-get update -y
sudo apt-get install build-essential g++ git-core -y
# Install nvm & node 4 as default
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
export NVM_DIR="/home/vagrant/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install 4
nvm use 4
nvm alias default 4
# -*- 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|
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 1
end
config.vm.synced_folder "source", "vagrant dest"
config.ssh.forward_agent = true
config.vm.box = "trusty64"
config.vm.network "private_network", ip: "44.44.44.44"
config.vm.provision "shell",
:path => "vagrant_provision_xxxx.sh" # replace xxxx = name of language you use for project
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment