Vagrantfile 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # All Vagrant configuration is done below. The "2" in Vagrant.configure
  4. # configures the configuration version (we support older styles for
  5. # backwards compatibility). Please don't change it unless you know what
  6. # you're doing.
  7. Vagrant.configure("2") do |config|
  8. # The most common configuration options are documented and commented below.
  9. # For a complete reference, please see the online documentation at
  10. # https://docs.vagrantup.com.
  11. config.vm.disk :disk, size: "120GB", primary: true
  12. # Every Vagrant development environment requires a box. You can search for
  13. # boxes at https://vagrantcloud.com/search.
  14. config.vm.box = "ubuntu/jammy64"
  15. config.vm.box_version = "20221219.0.0"
  16. # Disable automatic box update checking. If you disable this, then
  17. # boxes will only be checked for updates when the user runs
  18. # `vagrant box outdated`. This is not recommended.
  19. # config.vm.box_check_update = false
  20. # Create a forwarded port mapping which allows access to a specific port
  21. # within the machine from a port on the host machine. In the example below,
  22. # accessing "localhost:8080" will access port 80 on the guest machine.
  23. # NOTE: This will enable public access to the opened port
  24. # config.vm.network "forwarded_port", guest: 80, host: 8080
  25. # Create a forwarded port mapping which allows access to a specific port
  26. # within the machine from a port on the host machine and only allow access
  27. # via 127.0.0.1 to disable public access
  28. # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
  29. # Create a private network, which allows host-only access to the machine
  30. # using a specific IP.
  31. # config.vm.network "private_network", ip: "192.168.33.10"
  32. # Create a public network, which generally matched to bridged network.
  33. # Bridged networks make the machine appear as another physical device on
  34. # your network.
  35. config.vm.network "public_network"
  36. # Share an additional folder to the guest VM. The first argument is
  37. # the path on the host to the actual folder. The second argument is
  38. # the path on the guest to mount the folder. And the optional third
  39. # argument is a set of non-required options.
  40. config.vm.synced_folder "..", "/var/www/localhost"
  41. # Provider-specific configuration so you can fine-tune various
  42. # backing providers for Vagrant. These expose provider-specific options.
  43. # Example for VirtualBox:
  44. #
  45. config.vm.provider "virtualbox" do |vb|
  46. # Display the VirtualBox GUI when booting the machine
  47. vb.gui = false
  48. # Customize the amount of memory on the VM:
  49. vb.memory = "4096"
  50. end
  51. #
  52. # View the documentation for the provider you are using for more
  53. # information on available options.
  54. # Enable provisioning with a shell script. Additional provisioners such as
  55. # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
  56. # documentation for more information about their specific syntax and use.
  57. config.vm.provision "shell", inline: <<-SHELL
  58. apt update
  59. apt -y upgrade
  60. SHELL
  61. end