Vagrant.configure("2") do |config| config.vm.boot_timeout = 600 config.vm.box = "ubuntu/focal64" config.vm.network :forwarded_port, guest: 80, host: 1111 config.vm.synced_folder "../../games-shop", "/var/www/html" config.vm.provision "shell", inline: <<-SHELL sudo apt update # Install dependencies sudo apt install ca-certificates apt-transport-https software-properties-common lsb-release debian-keyring debian-archive-keyring curl -y sudo add-apt-repository ppa:ondrej/php -y sudo apt update sudo apt install nginx php8.3 php8.3-{cli,fpm,curl,gd,zip,fileinfo,common,sqlite3,dom,mbstring,simplexml,xml,xmlreader,xmlwriter} -y sudo ufw allow "OpenSSH" sudo ufw allow "Nginx HTTP" sudo ufw --force enable sudo rm /etc/nginx/sites-enabled/default sudo ln -s /var/www/html/deploy/nginx-file /etc/nginx/sites-enabled/default sudo systemctl enable --now nginx sudo systemctl restart nginx php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" sudo mv composer.phar /usr/local/bin/composer SHELL end