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

Commit d8bda6f

Browse files
committed
Merge branch 'hotfix/375' into develop
Forward port #375
2 parents ab26365 + 52b5102 commit d8bda6f

File tree

3 files changed

+48
-16
lines changed

3 files changed

+48
-16
lines changed

.gitignore

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
nbproject
2-
._*
3-
.vagrant
4-
.~lock.*
5-
.buildpath
6-
.DS_Store
7-
.idea
8-
.project
9-
.settings
101
vendor/
112
composer.phar
123
config/development.config.php
134
phpunit.xml
5+
ubuntu-xenial-16.04-cloudimg-console.log

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ control. (If you want to make the modifications permanent, edit the
7171

7272
## Using Vagrant
7373

74-
This skeleton includes a `Vagrantfile` based on ubuntu 14.04, and using the
74+
This skeleton includes a `Vagrantfile` based on ubuntu 16.04, and using the
7575
ondrej/php PPA to provide PHP 7.0. Start it up using:
7676

7777
```bash
@@ -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

+36-6
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,59 @@
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
16+
17+
# Configure Apache
18+
echo "<VirtualHost *:80>
19+
DocumentRoot /var/www/public
20+
AllowEncodedSlashes On
21+
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
1133
a2enmod rewrite
1234
service apache2 restart
13-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
14-
if ! grep "cd /var/www" /home/vagrant/.profile > /dev/null; then
15-
echo "cd /var/www" >> /home/vagrant/.profile
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
44+
echo "cd /var/www" >> /home/ubuntu/.profile
1645
fi
46+
1747
echo "** [ZF] Run the following command to install dependencies, if you have not already:"
1848
echo " vagrant ssh -c 'composer install'"
1949
echo "** [ZF] Visit http://localhost:8080 in your browser for to view the application **"
2050
SCRIPT
2151

2252
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
23-
config.vm.box = 'ubuntu/trusty64'
53+
config.vm.box = 'ubuntu/xenial64'
2454
config.vm.network "forwarded_port", guest: 80, host: 8080
2555
config.vm.synced_folder '.', '/var/www'
2656
config.vm.provision 'shell', inline: @script
2757

2858
config.vm.provider "virtualbox" do |vb|
2959
vb.customize ["modifyvm", :id, "--memory", "1024"]
60+
vb.customize ["modifyvm", :id, "--name", "ZF Application - Ubuntu 16.04"]
3061
end
31-
3262
end

0 commit comments

Comments
 (0)