Add homestead support

This commit is contained in:
Dane Everitt 2016-01-11 22:37:12 -05:00
parent fa56165df6
commit 24fadc0cb2
5 changed files with 69 additions and 1 deletions

View File

@ -3,6 +3,7 @@ APP_DEBUG=true
APP_KEY=SomeRandomString
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
/vendor
*.DS_Store*
.env
.vagrant/*
composer.lock

37
Homestead.yaml Normal file
View File

@ -0,0 +1,37 @@
---
ip: "192.168.10.10"
memory: 512
cpus: 1
hostname: panel
name: panel
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: "/path/to/local/files"
to: "/home/vagrant/panel"
type: nfs
sites:
- map: pterodactyl.app
to: "/home/vagrant/panel/public"
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp

28
Vagrantfile vendored Normal file
View File

@ -0,0 +1,28 @@
require 'json'
require 'yaml'
VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))
homesteadYamlPath = "Homestead.yaml"
homesteadJsonPath = "Homestead.json"
afterScriptPath = "after.sh"
aliasesPath = "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

View File

@ -22,7 +22,8 @@
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"symfony/css-selector": "~3.0",
"symfony/dom-crawler": "~3.0"
"symfony/dom-crawler": "~3.0",
"laravel/homestead": "^3.0"
},
"autoload": {
"classmap": [