Difference between revisions of "Vagrantfile"

From rbachwiki
Jump to navigation Jump to search
(Created page with "<pre> # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| #-- Box Settings config.vm.box = "ubuntu/trusty64" #--network Settings # config.vm...")
 
Line 9: Line 9:


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


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


   # config.vm.network "private_network", ip: "192.168.33.10"
   config.vm.network "private_network", ip: "192.168.33.10"


   # config.vm.network "public_network"
   # config.vm.network "public_network"
   #--Folder Settings
   #--Folder Settings the firt parameter is the host machine The . means current folder, second is the box
   # config.vm.synced_folder "../data", "/vagrant_data"
   config.vm.synced_folder ".", "/var/www/html", :mount_options =>["dmode=777", "fmode=666"]


   #-- Provider Settings
   #-- Provider Settings
   config.vm.provider "virtualbox" do |vb|
   config.vm.provider "virtualbox" do |vb|
     # Display the VirtualBox GUI when booting the machine
     # Display the VirtualBox GUI when booting the machine
     vb.gui = true
     vb.gui = false


     # Customize the amount of memory on the VM:
     # Customize the amount of memory on the VM:
Line 34: Line 34:
   #  apt-get install -y apache2
   #  apt-get install -y apache2
   # SHELL
   # SHELL
  config.vm.provision "shell", path: "bootstrap.sh"
end
end


</pre>
</pre>

Revision as of 23:32, 12 February 2019

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

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

  #-- Box Settings
  config.vm.box = "ubuntu/trusty64"

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

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

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

  # config.vm.network "public_network"
  #--Folder Settings the firt parameter is the host machine The . means current folder, second is the box
  config.vm.synced_folder ".", "/var/www/html", :mount_options =>["dmode=777", "fmode=666"]

  #-- Provider Settings
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = false

    # Customize the amount of memory on the VM:
    vb.memory = "2048"
    vb.cpus = 2
  end

  # -- Provision Settings
  # config.vm.provision "shell", inline: <<-SHELL
  #   apt-get update
  #   apt-get install -y apache2
  # SHELL
  config.vm.provision "shell", path: "bootstrap.sh"
end