blob: a815112fda8a1367588d94adaff70d3c61bdc5cb [file] [log] [blame]
Vagrant.configure("2") do |config|
# base image
config.vm.box = "ubuntu/trusty64"
# share the folder
config.vm.synced_folder "../../", "/home/vagrant/", create: true
config.vm.synced_folder ".", "/vagrant", disabled: true
# set the frontend vm
config.vm.define "frontend" do |d|
d.vm.network "forwarded_port", guest: 9999, host: 9999
d.vm.network "forwarded_port", guest: 6379, host: 6379
d.vm.network "private_network", ip: "192.168.46.100"
d.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
end
config.vm.provision "shell", privileged: false, inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates git
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo deb https://apt.dockerproject.org/repo ubuntu-trusty main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y git docker-engine python-pip python-dev build-essential
sudo pip install docker-compose
sudo groupadd docker
sudo usermod -aG docker vagrant
SHELL
end