1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

[ticket/14547] Add Vagrant to phpBB

PHPBB3-14547
This commit is contained in:
Matt Friedman
2016-03-12 11:26:26 -08:00
parent ead261e6db
commit 6196e4ae4d
9 changed files with 318 additions and 2 deletions

28
Vagrantfile vendored Normal file
View File

@@ -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