예제 #1
0
 private function setupNginx(SetupCommand $setupCommand)
 {
     $base = base_path() . '/server_config';
     $name = $setupCommand->getRepoName() . '.dev';
     $command = sprintf("sudo cp %s/local.app.conf /etc/nginx/sites-available/%s", $base, $name);
     exec($command);
     $setupCommand->info(sprintf("Copied file into nginx available %s", $name));
     $command = sprintf("sudo ln -s /etc/nginx/sites-available/%s /etc/nginx/sites-enabled/%s", $name, $name);
     exec($command);
     $setupCommand->info(sprintf("Symlinked file into nginx enabled %s", $name));
     exec("sudo /etc/init.d/nginx restart");
     $site = 'https://' . $setupCommand->getRepoName() . ':44300';
     $setupCommand->info(sprintf("Restarting Nginx you should now see the site at %s", $site));
     $setupCommand->info(sprintf("Make sure to set your /etc/hosts file locally for this site %s and 127.0.0.1", $site));
     $setupCommand->info(sprintf("SSL not setup? See docs https://github.com/alfred-nutile-inc/internal_practices/blob/master/ssl.md"));
 }
예제 #2
0
 protected function setupDB(SetupCommand $setupCommand)
 {
     $command = sprintf('mysql -uhomestead -psecret -e "create database %s"', $setupCommand->getRepoName());
     exec($command);
     $setupCommand->info(sprintf("Made db in homestead %s", $setupCommand->getRepoName()));
 }