aboutsummaryrefslogtreecommitdiffstats
path: root/Vagrantfile
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2016-03-12 11:26:26 -0800
committerMatt Friedman <maf675@gmail.com>2016-04-28 08:36:49 -0700
commit6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e (patch)
tree4c64c8a459850f434bdd7061570f5dbbf777fd8c /Vagrantfile
parentead261e6dba4d470160c6a31f95430b4053c0d54 (diff)
downloadforums-6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e.tar
forums-6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e.tar.gz
forums-6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e.tar.bz2
forums-6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e.tar.xz
forums-6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e.zip
[ticket/14547] Add Vagrant to phpBB
PHPBB3-14547
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 0000000000..d8ba9b3137
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,28 @@
+require 'json'
+require 'yaml'
+
+VAGRANTFILE_API_VERSION ||= "2"
+confDir = $confDir ||= File.expand_path("phpBB/vendor/laravel/homestead", File.dirname(__FILE__))
+
+homesteadYamlPath = "vagrant/bootstrap.yaml"
+homesteadJsonPath = "vagrant/bootstrap.json"
+afterScriptPath = "vagrant/after.sh"
+aliasesPath = "vagrant/aliases"
+
+require File.expand_path(confDir + '/scripts/homestead.rb')
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ if File.exists? aliasesPath then
+ config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
+ end
+
+ if File.exists? homesteadYamlPath then
+ Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
+ elsif File.exists? homesteadJsonPath then
+ Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
+ end
+
+ if File.exists? afterScriptPath then
+ config.vm.provision "shell", path: afterScriptPath
+ end
+end