protected function migrate(SetupCommand $setupCommand)
 {
     $setupCommand->call('migrate:install');
     $setupCommand->info("Install Migrations");
     $setupCommand->call('migrate:refresh', ['--seed']);
     $setupCommand->info("Seeding Done");
 }
 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"));
 }
 protected function setupBower(SetupCommand $setupCommand)
 {
     File::copy(base_path() . '/deployment/stubs/.bowerrc', base_path() . '/.bowerrc');
     File::copy(base_path() . '/deployment/stubs/bower.json', base_path() . '/bower.json');
     File::copy(base_path() . '/deployment/stubs/package.json', base_path() . '/package.json');
     $setupCommand->info("Added bower and bower.json.");
     exec('npm install');
     exec('bower install');
 }
 protected function setupDB(SetupCommand $setupCommand)
 {
     if (File::exists(base_path() . '/database/stubdb.sqlite')) {
         File::delete(base_path() . '/database/stubdb.sqlite');
     }
     File::put(base_path() . '/database/stubdb.sqlite', '');
     if (File::exists(base_path() . '/database/testing.sqlite')) {
         File::delete(base_path() . '/database/testing.sqlite');
     }
     /**
      * @TODO Replace this with artisan command
      */
     $command = "sh " . base_path() . '/deployment/migrate_testing.sh';
     exec($command);
     File::copy(base_path() . '/database/stubdb.sqlite', base_path() . '/database/testing.sqlite');
     $setupCommand->info("Testing db info added");
 }
 public static function fire(SetupCommand $setupCommand)
 {
     $run = new self();
     File::copyDirectory(__DIR__ . '/../deployment', base_path() . '/deployment');
     $setupCommand->info("Deployment folder made");
 }
Beispiel #6
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()));
 }