AutorÃa | Ultima modificación | Ver Log |
# -*- mode: ruby -*-# vi: set ft=ruby :VAGRANTFILE_API_VERSION = '2'@script = <<SCRIPT# Install dependenciesLC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/phpapt-get updateapt-get install -y apache2 git curl php7.3 php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-curl php7.3-intl php7.3-json php7.3-mbstring php7.3-opcache php7.3-soap php7.3-sqlite3 php7.3-xml php7.3-xsl php7.3-zip libapache2-mod-php7.3# Configure Apacheecho '<VirtualHost *:80>DocumentRoot /var/www/publicAllowEncodedSlashes On<Directory /var/www/public>Options +Indexes +FollowSymLinksDirectoryIndex index.php index.htmlOrder allow,denyAllow from allAllowOverride All</Directory>ErrorLog ${APACHE_LOG_DIR}/error.logCustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>' > /etc/apache2/sites-available/000-default.confa2enmod rewriteservice apache2 restartif [ -e /usr/local/bin/composer ]; then/usr/local/bin/composer self-updateelsecurl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composerfi# Reset home directory of vagrant userif ! grep -q "cd /var/www" /home/vagrant/.profile; thenecho "cd /var/www" >> /home/vagrant/.profilefiecho "** [Laminas] Run the following command to install dependencies, if you have not already:"echo " vagrant ssh -c 'composer install'"echo "** [Laminas] Visit http://localhost:8080 in your browser for to view the application **"SCRIPTVagrant.configure(VAGRANTFILE_API_VERSION) do |config|config.vm.box = 'bento/ubuntu-18.04'config.vm.network "forwarded_port", guest: 80, host: 8080config.vm.synced_folder '.', '/var/www'config.vm.provision 'shell', inline: @scriptconfig.vm.provider "virtualbox" do |vb|vb.customize ["modifyvm", :id, "--memory", "1024"]vb.customize ["modifyvm", :id, "--name", "Laminas MVC Skeleton - Ubuntu 18.04"]endend