New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

alfred-nutile-inc/setup

Setup apps in one command for local work
1,089
Install
composer require alfred-nutile-inc/setup:dev-master
PHP:>=5.4.0
Last Updated:Mar 23, 2015
Links: GitHub  ·  Packagist
Maintainer: alnutile

CoreApp Setup

This requires some conventions noted below.

Pull it in via composer

composer require alfred-nutile-inc/setup

Then add it to your Kernel

	protected $commands = [
		'App\Console\Commands\Inspire',
		'AlfredNutileInc\CoreApp\SetUp\SetupCommand'
	];

Then

Setup

Git clone the repo to your homestead

The conventions for this setup is simple

Your local domain is the same as the repo name. If the repo is foo then foo.dev

The Command is

php artisan core-app:setup reponame

This will

  • setup the db as the name of the reponame
  • setup nginx and restart it as the domain name says above. You need to udpate you machine hosts file
  • copies .env.example to .env update it as needed.
  • sets up testing stub db for sqlite
  • composer install and dump-autoload
  • migrates
  • bower install
  • npm install

You can limit what to run like this

php artisan core-app:setup reponame --run=SetupServerConfig --run=SetupFrontEnd

Conventions

Your local env is named after the repo name and .dev so repo foo is foo.dev local

SSL is always default. https://github.com/alfred-nutile-inc/internal_practices/blob/master/ssl.md for help on this.

Adding to the package

Just add your step to app/SetUp/SetupCommand.php:93

        SetupDeploymentScripts::fire($this);
        SetupEnv::fire($this);
        SetupDb::fire($this);
        RunMigrations::fire($this);
        SetupTesting::fire($this);
        SetupFrontEnd::fire($this);
        SetupServerConfig::fire($this);

RoadMap

  • Flags to run only some/one of the steps php artisan core-app:setup reponame --SetupEnv --SetupDevelopmentScripts
  • Plugin steps that are part of the project and not part of this repo.
  • One command to setup Ec2, RDS etc
  • S3 setup
  • Setup git repo dev, prod, staging and delete master

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

407,699,310 4,663