Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Commit 0a159a1

Browse files
committed
Updated Vagrant configuration and added minimum requirements in README.md
1 parent 920bfe6 commit 0a159a1

File tree

2 files changed

+41
-10
lines changed

2 files changed

+41
-10
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ $ vagrant ssh -c 'composer update'
9494
While running, Vagrant maps your host port 8080 to port 80 on the virtual
9595
machine; you can visit the site at http://localhost:8080/
9696

97+
> ### Vagrant and VirtualBox
98+
>
99+
> The vagrant image is based on ubuntu/xenial64. If you are using VirtualBox as
100+
> a provider, you will need:
101+
>
102+
> - Vagrant 1.8.5 or later
103+
> - VirtualBox 5.0.26 or later
104+
105+
For vagrant documentation, please refer to [vagrantup.com](https://www.vagrantup.com/)
106+
97107
## Using docker-compose
98108

99109
This skeleton provides a `docker-compose.yml` for use with

Vagrantfile

+31-10
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,46 @@
44
VAGRANTFILE_API_VERSION = '2'
55

66
@script = <<SCRIPT
7+
# Fix for https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1561250
8+
if ! grep -q "ubuntu-xenial" /etc/hosts; then
9+
echo "127.0.0.1 ubuntu-xenial" >> /etc/hosts
10+
fi
11+
12+
# Install dependencies
713
add-apt-repository ppa:ondrej/php
814
apt-get update
915
apt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0
10-
sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf
1116
12-
echo "<Directory /var/www/public>
13-
Options +Indexes +FollowSymLinks
14-
DirectoryIndex index.php index.html
15-
Order allow,deny
16-
Allow from all
17-
AllowOverride All
18-
</Directory>" > /etc/apache2/conf-enabled/htaccess.conf
17+
# Configure Apache
18+
echo "<VirtualHost *:80>
19+
DocumentRoot /var/www/public
20+
AllowEncodedSlashes On
1921
22+
<Directory /var/www/public>
23+
Options +Indexes +FollowSymLinks
24+
DirectoryIndex index.php index.html
25+
Order allow,deny
26+
Allow from all
27+
AllowOverride All
28+
</Directory>
29+
30+
ErrorLog ${APACHE_LOG_DIR}/error.log
31+
CustomLog ${APACHE_LOG_DIR}/access.log combined
32+
</VirtualHost>" > /etc/apache2/sites-available/000-default.conf
2033
a2enmod rewrite
2134
service apache2 restart
22-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
23-
if ! grep "cd /var/www" /home/ubuntu/.profile > /dev/null; then
35+
36+
if [ -e /usr/local/bin/composer ]; then
37+
/usr/local/bin/composer self-update
38+
else
39+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
40+
fi
41+
42+
# Reset home directory of vagrant user
43+
if ! grep -q "cd /var/www" /home/ubuntu/.profile; then
2444
echo "cd /var/www" >> /home/ubuntu/.profile
2545
fi
46+
2647
echo "** [ZF] Run the following command to install dependencies, if you have not already:"
2748
echo " vagrant ssh -c 'composer install'"
2849
echo "** [ZF] Visit http://localhost:8080 in your browser for to view the application **"

0 commit comments

Comments
 (0)