Vagrant.configure("2") do |config|
  config.vm.box = "debian/bookworm64"
  config.vm.hostname = "sm71a2"
  config.vm.provider "virtualbox" do |v|
    # v.gui = true
    v.name = "sm71a2"
    v.memory = 2048
    v.cpus = 2
    v.customize ['modifyvm', :id, '--clipboard', 'bidirectional', '--groups','/BD']     
    config.vm.synced_folder "./codi", "/var/www/html" # S'ha de crear prèviament una carpeta de nom codi a la mateixa carpeta a on es troba Vagrantfile
    config.vm.synced_folder "./altres", "/home/vagrant/altres" # S'ha de crear prèviament una carpeta de nom altres a la mateixa carpeta a on es troba Vagrantfile
  end
  config.vm.network "public_network"
  config.vm.provision "shell", inline: <<-SHELL
    sudo apt-get update -y
    sudo apt-get install -y net-tools whois aptitude git zip unzip curl
    sudo apt-get install -y apache2 apache2-doc
    sudo apt-get install -y mariadb-server mariadb-client 
    sudo apt-get install -y php libapache2-mod-php php-mysql      
  SHELL
end
