add setup command; closes #27

This commit is contained in:
Dane Everitt 2016-01-16 00:37:06 -05:00
parent 7670cf1466
commit 09d9f2a064
4 changed files with 10 additions and 65 deletions

2
.gitignore vendored
View file

@ -6,3 +6,5 @@
composer.lock
Homestead.yaml
Vagrantfile
Vagrantfile

View file

@ -1,37 +0,0 @@
---
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/folder"
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
View file

@ -1,28 +0,0 @@
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

@ -54,6 +54,14 @@
],
"post-update-cmd": [
"php artisan optimize"
],
"setup": [
"composer install",
"php -r \"copy('.env.example', '.env');\"",
"php vendor/bin/homestead make --ip=192.168.10.32",
"sed -i.bak 's/homestead.app/pterodactyl.local/g' Homestead.yaml",
"rm Homestead.yaml.bak",
"php artisan key:generate"
]
},
"config": {