# -*- mode: ruby -*- # vi: set ft=ruby ai sw=2 : # Version 2. Vagrant.configure(2) do |config| # Base box. config.vm.box = "paliarush/magento2.ubuntu" # Create a private network allowing host-only access. config.vm.network "private_network", ip: "192.168.33.33" # Extra sync folder. config.vm.synced_folder "scripts", "/scripts" # Auth.json + composer cache, don't sync changes back to avoid collisions. config.vm.synced_folder ENV['HOME'] + '/.composer/', '/home/vagrant/.composer/', type: 'rsync', rsync__auto: false # Source code config.vm.synced_folder '.', '/vagrant', type: 'rsync', rsync__exclude: [ 'Vagrantfile', # Vagrant control file '.vagrant/', # Vagrant work area '.git/', # Git repository '.gitignore', # Git support file '.gitattributes', # Git support file 'var/', # Temporary files used by Magento 'pub/media/', # Don't wipe uploaded media files pub/media 'pub/static/', # Don't wipe generated assets under pub/static 'scripts/', # Support shell scripts 'vendor/', # Compose download area '.idea/', # PHP Storm project files 'app/etc/env.php', # Don't want to overwrite DB settings '.magento' # Used by Magento Cloud ], rsync__auto: true # Virtualbox specific configuration. config.vm.provider "virtualbox" do |vb| # Customize the amount of memory on the VM: vb.memory = "2048" end # Final provisioning. (Should move into a base box.) config.vm.provision "shell", inline: <<-SHELL echo ==== Installing NodeJS ==== sh -x /scripts/install-nodejs echo ==== Installing Gulp ==== sh -x /scripts/install-gulp echo ==== Installing Magento web server configuration ==== sudo -i -u vagrant sh -x /scripts/install-magento SHELL end