Skip to content

Instantly share code, notes, and snippets.

@iancullinane
Last active April 21, 2017 17:26
Show Gist options
  • Select an option

  • Save iancullinane/462b30adc339ab5045d335114d04c9b4 to your computer and use it in GitHub Desktop.

Select an option

Save iancullinane/462b30adc339ab5045d335114d04c9b4 to your computer and use it in GitHub Desktop.
Basic Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
hostname = "turbine-games"
# base box
config.vm.box = "ubuntu/trusty64"
config.ssh.forward_agent = true
# network stuff
config.vm.network "forwarded_port", guest: "80", host: "8020"
config.vm.network "private_network", ip: "192.168.33.200"
config.vm.hostname = "turbine-games"
config.vm.define "turbine-games" do |foohost|
end
# sync a folder to have available on host editor
# sync a folder to have available on host editor
config.vm.synced_folder __dir__ + "/dev/", "/home/vagrant/dev/"
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 4
end
config.vm.provision :shell, :inline => "sudo rm /etc/localtime && sudo ln -s /usr/share/zoneinfo/America/New_York /etc/localtime", run: "always"
config.vm.provision "shell", inline: <<-SHELL
sudo curl https://get.docker.com | bash;
sudo wget https://bootstrap.pypa.io/get-pip.py;
python get-pip.py;
sudo pip install docker-compose
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs;
wget https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.7.1.linux-amd64.tar.gz
curl https://gist.githubusercontent.com/iancullinane/0203c3aeb2cdeedb4857d5a0efd12e67/raw/77b9a8980c7860966ed72b29fab35b22f6085467/.bashrc > ~/.bashrc
SHELL
#run a script to provision
#config.vm.provision "shell", path: "scripts/base.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment