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

Commit cbec235

Browse files
committed
Merge branch 'gianarb-feature/vagrant-slim'
Closes #288
2 parents a131c30 + e9d9d5c commit cbec235

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
nbproject
22
._*
3+
.vagrant
34
.~lock.*
45
.buildpath
56
.DS_Store

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ If you don't have composer installed globally then another way to create a new Z
3636

3737
If you don't have access to curl, then install Composer into your project as per the [documentation](https://getcomposer.org/doc/00-intro.md).
3838

39+
### Installing using Vagrant
40+
41+
This project support a basic [Vagrant](http://docs.vagrantup.com/v2/getting-started/index.html) configuration to provide with a bash script your Skeleton Application into the VirtualBox VM.
42+
43+
1. Run vagrant up command
44+
45+
vagrant up
46+
47+
2. Visit [http://localhost:8085](http://localhost:8085) in your browser
3948

4049
Web Server Setup
4150
----------------

Vagrantfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
VAGRANTFILE_API_VERSION = '2'
5+
6+
@script = <<SCRIPT
7+
DOCUMENT_ROOT_ZEND="/var/www/zf/public"
8+
apt-get update
9+
apt-get install -y apache2 git curl php5-cli php5 php5-intl libapache2-mod-php5
10+
echo "
11+
<VirtualHost *:80>
12+
ServerName skeleton-zf.local
13+
DocumentRoot $DOCUMENT_ROOT_ZEND
14+
<Directory $DOCUMENT_ROOT_ZEND>
15+
DirectoryIndex index.php
16+
AllowOverride All
17+
Order allow,deny
18+
Allow from all
19+
</Directory>
20+
</VirtualHost>
21+
" > /etc/apache2/sites-available/skeleton-zf.conf
22+
a2enmod rewrite
23+
a2dissite 000-default
24+
a2ensite skeleton-zf
25+
service apache2 restart
26+
cd /var/www/zf
27+
curl -Ss https://getcomposer.org/installer | php
28+
php composer.phar install --no-progress
29+
echo "** [ZEND] Visit http://localhost:8085 in your browser for to view the application **"
30+
SCRIPT
31+
32+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
33+
config.vm.box = 'chef/ubuntu-14.04'
34+
config.vm.network "forwarded_port", guest: 80, host: 8085
35+
config.vm.hostname = "skeleton-zf.local"
36+
config.vm.synced_folder '.', '/var/www/zf'
37+
config.vm.provision 'shell', inline: @script
38+
39+
config.vm.provider "virtualbox" do |vb|
40+
vb.customize ["modifyvm", :id, "--memory", "1024"]
41+
end
42+
43+
end

0 commit comments

Comments
 (0)