1_om9g
Last Updated: February 25, 2016
·
421
· luukyb

Minimal Vagrantfile for web applications

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

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "ubuntu/trusty64"

  config.vm.network "forwarded_port", guest: 80, host: 8080

  config.vm.network "private_network", ip: "192.168.33.137"

  config.vm.synced_folder "data", "/var/www/html", owner: "vagrant", group: "www-data", mount_options: ["dmode=775,fmode=664"]

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
  end

end

2 Responses
Add your response

17501

What do the mount_options do? How does setting the dmode and fmode affect the mounting of the directory?

over 1 year ago ·
17507

mount_options (dmode and fmode) are setting up the permissions on your folder for the VM

over 1 year ago ·