cuonghuynh
6/12/2018 - 3:00 PM

Vagrant file configuration of Scotchbox with sync multiple folders

Vagrant file configuration of Scotchbox with sync multiple folders

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

    config.vm.box = "scotch/box"
    config.vm.network "private_network", ip: "192.168.33.10"
    config.vm.hostname = "scotchbox"
    #config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
    
    # Optional NFS. Make sure to remove other synced_folder line too
    config.vm.synced_folder "~/Code/app1/", "/var/www/app1",
    	id: "app1",
    	owner: "vagrant",
        group: "www-data",
        mount_options: ["dmode=775,fmode=775"]
    config.vm.synced_folder "~/Code/app2", "/var/www/app2",
    	id: "app2",
        owner: "vagrant",
        group: "www-data",
        mount_options: ["dmode=775,fmode=775"]
end