示例#1
0
 /**
  * Handle the event.
  *
  * @param Event $event
  */
 public function handle(Event $event)
 {
     $event->site->updateStatus('Adding mysql database');
     $sql = 'CREATE DATABASE IF NOT EXISTS ' . Str::snake($event->site->name) . ';';
     $this->envoy->run('mysql --sql="' . $sql . '"', true);
     $this->envoy->run('artisan --path="' . $event->site->rootPath . '" --cmd="migrate"', true);
 }
示例#2
0
 /**
  * @param Event $event
  */
 public function handle(Event $event)
 {
     $event->site->updateStatus('Running the installer');
     $installerType = $event->request['installType'] == 'base' ? null : '"--' . $event->request['installType'] . '"';
     $group = $this->group->find($event->request['group_id']);
     $sitePath = Str::camel($event->request['name']);
     $this->envoy->run('make-site --path="' . $group->starting_path . '" --name="' . $sitePath . '" --type=' . $installerType, true);
 }
示例#3
0
 /**
  * @param Event $event
  */
 public function handle(Event $event)
 {
     $cloneModel = $this->clone->find($event->request['clone_id']);
     $group = $this->group->find($event->request['group_id']);
     $sitePath = Str::camel($event->request['name']);
     $event->site->updateStatus('Cloning the repo');
     $this->envoy->run('clone --path="' . $group->starting_path . '" --name="' . $sitePath . '" --url=' . $cloneModel->url, true);
 }
示例#4
0
 /**
  * Handle the event.
  *
  * @param Event $event
  */
 public function handle(Event $event)
 {
     $event->site->updateStatus('Running composer install');
     $this->envoy->run('composer --path="' . $event->site->rootPath . '" --cmd=install', true);
 }
示例#5
0
文件: Key.php 项目: NukaCode/dasher
 /**
  * Handle the event.
  *
  * @param Event $event
  */
 public function handle(Event $event)
 {
     $event->site->updateStatus('Generating key');
     $this->envoy->run('artisan --path="' . $event->site->rootPath . '" --cmd="key:generate"', true);
 }
示例#6
0
文件: Nginx.php 项目: NukaCode/dasher
 protected function reloadNginx($site)
 {
     $site->updateStatus('Reloading nginx');
     $this->envoy->run('nginx --cmd="reload"');
 }
示例#7
0
 protected function provisionVagrant($site)
 {
     $site->updateStatus('Re-provisioning vagrant box');
     $this->envoy->run('vagrant --cmd="provision" --path="' . setting('homestead') . '"');
 }