-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
29 lines (23 loc) · 1.11 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "blinkreaction/boot2docker"
# Network config & shared folders
config.vm.network "private_network", ip: "192.168.33.210"
config.vm.synced_folder "..", "/home/docker/reactcom", id: "reactcom-dev" , type: "nfs"
config.vm.synced_folder "~/.composer/", "/home/docker/.composer", id: "reactcom-composer" , type: "nfs"
# VM definition
config.vm.provider "virtualbox" do |vb|
vb.name = "reactcom"
vb.memory = 1024
vb.cpus = 1
end
# Bring up containers
config.vm.provision "shell", run: "always", inline: "cd /home/docker/reactcom/phpdocker && docker-compose up -d 1>&2"
# Redirect webserver port down 80, etc
config.vm.provision "shell", run: "always", inline: "/usr/local/sbin/iptables -i eth1 -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8059 1>&2"
# Disable guest additions auto update as it won't work on boot2docker, and slows vm boot down boot
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
end