multi-laradock

0.0.3 • Public • Published

MultiLaradock

What is it?

MultiLaradock is a Command Line Interface program born to automate Laravel development configuration in a multiproject Laradock setup.

It is NOT a general-purpose Laradock CLI. I don't have time and experience to build and mantain something like that.

When do you use it?

When you have a Laravel project and you want to serve it using existent Laradock environment without breaking things.

Use case

We have a project setup like this:

+ laradock/		# Laradock multiproject installation directory
+ project-1/	# A project served by Laradock
+ project-2/	# Another project served by Laradock
...
+ project-x/	# An existent project NOT configured by being served by Laradock

Laradock is (already!) configured to serve multiple projects on different URLs like http://project-1.test and http://project-2.test.

We want to serve project-x over http://project-x.test.

Before: had to modify NGINX configuration, modify /etc/hosts, create databases for testing and development, create database users.

Now: run multi-laradock new project-x and open http://project-x.test!

What does it do?

  1. Create nginx virtual host by copying over laravel.conf.example
  2. Edit /etc/hosts (if given permission)
  3. Create a database and a user for development
  4. Create a database and a user for testing

Installation and usage

To install you have to use a package manager for Node:

npm install -g multi-laradock

Change working directory to be in the parent folder of laradock and [project-name] like the example presented before. Run:

multi-laradock new [project_name]

Now, you're ready to go!

Options

  • new <name> : create configuration for <name>.
  • init <name> : cp .env and .env.testing, install deps and migrate:fresh onto <name>.
  • rm <name> : remove existing configuration for <name>. Pay attention: it will remove database and user too!

Why?

I develop Laravel applications using NGINX and MySQL mostly. I needed a fast and reliable way to add a new project into my existing development setup.

Package Sidebar

Install

npm i multi-laradock

Weekly Downloads

4

Version

0.0.3

License

MIT

Unpacked Size

16.5 kB

Total Files

4

Last publish

Collaborators

  • sgametrio