-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
40 lines (26 loc) · 1.65 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
30
31
32
33
34
35
36
37
38
39
40
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", path: "provision/init.sh"
# php-fpm fails to start before /vagrant dir is mounted so need to restart docker container
config.vm.provision "shell", inline: "su -c 'cd /vagrant && docker-compose stop && sleep 3 && docker-compose up -d' vagrant", run: "always"
config.vm.network "private_network", ip: "192.168.55.55"
config.vm.provider "virtualbox" do |v|
v.name = "Web Dev Server - Docker (GitHub)"
v.customize ["modifyvm", :id, "--memory", "2048"]
v.cpus = 2
# making sure host OS is used as a name server
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
#====================================================================================================================================================
# Shared folders
# Mounting folders with standard sharing:
config.vm.synced_folder "./", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
config.vm.synced_folder "./www", "/www", :mount_options => ["dmode=777","fmode=777"]
# NFS (Network File System) for shared folders
# Mac OSX and Windows with `winnfsd` plugin (https://github.com/winnfsd/vagrant-winnfsd) can use these folders
# Uncomment if NFS is supported on your system:
# config.vm.synced_folder ".", "/vagrant_nfs", type: "nfs"
# config.vm.synced_folder "./www", "/www_nfs", type: "nfs"
#====================================================================================================================================================
end