Proyectos de Subversion LeadersLinked - Services

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
# -*- mode: ruby -*-
2
# vi: set ft=ruby :
3
 
4
VAGRANTFILE_API_VERSION = '2'
5
 
6
@script = <<SCRIPT
7
# Install dependencies
8
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
9
apt-get update
10
apt-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
11
 
12
# Configure Apache
13
echo '<VirtualHost *:80>
14
	DocumentRoot /var/www/public
15
	AllowEncodedSlashes On
16
 
17
	<Directory /var/www/public>
18
		Options +Indexes +FollowSymLinks
19
		DirectoryIndex index.php index.html
20
		Order allow,deny
21
		Allow from all
22
		AllowOverride All
23
	</Directory>
24
 
25
	ErrorLog ${APACHE_LOG_DIR}/error.log
26
	CustomLog ${APACHE_LOG_DIR}/access.log combined
27
</VirtualHost>' > /etc/apache2/sites-available/000-default.conf
28
a2enmod rewrite
29
service apache2 restart
30
 
31
if [ -e /usr/local/bin/composer ]; then
32
    /usr/local/bin/composer self-update
33
else
34
    curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
35
fi
36
 
37
# Reset home directory of vagrant user
38
if ! grep -q "cd /var/www" /home/vagrant/.profile; then
39
    echo "cd /var/www" >> /home/vagrant/.profile
40
fi
41
 
42
echo "** [Laminas] Run the following command to install dependencies, if you have not already:"
43
echo "    vagrant ssh -c 'composer install'"
44
echo "** [Laminas] Visit http://localhost:8080 in your browser for to view the application **"
45
SCRIPT
46
 
47
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
48
  config.vm.box = 'bento/ubuntu-18.04'
49
  config.vm.network "forwarded_port", guest: 80, host: 8080
50
  config.vm.synced_folder '.', '/var/www'
51
  config.vm.provision 'shell', inline: @script
52
 
53
  config.vm.provider "virtualbox" do |vb|
54
    vb.customize ["modifyvm", :id, "--memory", "1024"]
55
    vb.customize ["modifyvm", :id, "--name", "Laminas MVC Skeleton - Ubuntu 18.04"]
56
  end
57
end