From 09d9f2a0647575e98fc3bd3f948ea74be126cf17 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 16 Jan 2016 00:37:06 -0500 Subject: [PATCH] add setup command; closes #27 --- .gitignore | 2 ++ Homestead.yaml.example | 37 ------------------------------------- Vagrantfile | 28 ---------------------------- composer.json | 8 ++++++++ 4 files changed, 10 insertions(+), 65 deletions(-) delete mode 100644 Homestead.yaml.example delete mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index bc90bb95..8a1adc7e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ composer.lock Homestead.yaml +Vagrantfile +Vagrantfile diff --git a/Homestead.yaml.example b/Homestead.yaml.example deleted file mode 100644 index 594fc501..00000000 --- a/Homestead.yaml.example +++ /dev/null @@ -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 diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 5c812591..00000000 --- a/Vagrantfile +++ /dev/null @@ -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 diff --git a/composer.json b/composer.json index ab9e728f..96ac2366 100644 --- a/composer.json +++ b/composer.json @@ -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": {