Create initial Vagrant files.

This commit is contained in:
PJ Dietz 2015-03-10 17:06:27 -04:00
parent b1f8b076a7
commit 3ed2b03ad2
4 changed files with 38 additions and 0 deletions

3
.gitignore vendored
View File

@ -15,3 +15,6 @@ preview
# PhpStorm
workspace.xml
# Vagrant
.vagrant/

6
Vagrantfile vendored Normal file
View File

@ -0,0 +1,6 @@
Vagrant.configure("2") do |config|
# Ubuntu 14.04 LTS
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8000
config.vm.provision "shell", path: "vagrant/provision.sh"
end

View File

@ -0,0 +1,9 @@
Welcome to the WellRESTed development box.
To run unit tests:
vendor/bin/phpunit
To generate documentation:
make html -C docs

20
vagrant/provision.sh Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
apt-get update
apt-get install -q -y git augeas-tools nginx php5 php5-fpm php5-cli php5-curl php5-xdebug python-pip
# Install or update composer.
if type composer &> /dev/null; then
composer self-update
else
curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin
fi
pip install sphinx sphinx_rtd_theme
composer --working-dir=/vagrant install
if ! grep /home/vagrant/.bashrc -e "cd /vagrant" &> /dev/null ; then
echo "cd /vagrant" >> /home/vagrant/.bashrc
echo "cat /vagrant/vagrant/log-in-message.txt" >> /home/vagrant/.bashrc
fi