summaryrefslogtreecommitdiff
path: root/Vagrantfile
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-01-26 21:08:29 -0500
committerFrederic Guillot <fred@kanboard.net>2015-01-26 21:08:29 -0500
commit29606b34cb5bce5c3cf656eb8acc137fb0836e76 (patch)
treea773f046e524a60f5e3e9a9a44d8c8297c3a20d9 /Vagrantfile
parentcdcc6843fd169574855f62471183dba07a903fce (diff)
Added automatic download and installation of Composer and PHPUnit for Vagrant (merge #550)
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile
index 35c6f419..46312e3a 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -7,6 +7,16 @@ echo "ServerName localhost" >> /etc/apache2/apache2.conf
service apache2 restart
rm -f /var/www/html/index.html
date > /etc/vagrant_provisioned_at
+# install Composer
+curl -s https://getcomposer.org/installer | php
+sudo mv composer.phar /usr/local/bin/composer
+# install PHPUnit
+wget https://phar.phpunit.de/phpunit.phar
+chmod +x phpunit.phar
+sudo mv phpunit.phar /usr/local/bin/phpunit
+phpunit --version
+# Set kanboard dir as working dir
+echo "cd /var/www/html" >> /home/vagrant/.bashrc
SCRIPT
$script_mysql = <<SCRIPT
@@ -20,6 +30,16 @@ service mysql restart
echo "create database kanboard;" | mysql -u root
rm -f /var/www/html/index.html
date > /etc/vagrant_provisioned_at
+# install Composer
+curl -s https://getcomposer.org/installer | php
+sudo mv composer.phar /usr/local/bin/composer
+# install PHPUnit
+wget https://phar.phpunit.de/phpunit.phar
+chmod +x phpunit.phar
+sudo mv phpunit.phar /usr/local/bin/phpunit
+phpunit --version
+# Set kanboard dir as working dir
+echo "cd /var/www/html" >> /home/vagrant/.bashrc
SCRIPT
$script_postgres = <<SCRIPT
@@ -32,6 +52,16 @@ service apache2 restart
service postgresql restart
rm -f /var/www/html/index.html
date > /etc/vagrant_provisioned_at
+# install Composer
+curl -s https://getcomposer.org/installer | php
+sudo mv composer.phar /usr/local/bin/composer
+# install PHPUnit
+wget https://phar.phpunit.de/phpunit.phar
+chmod +x phpunit.phar
+sudo mv phpunit.phar /usr/local/bin/phpunit
+phpunit --version
+# Set kanboard dir as working dir
+echo "cd /var/www/html" >> /home/vagrant/.bashrc
SCRIPT
Vagrant.configure("2") do |config|