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 you have a Laravel project and you want to serve it using existent Laradock environment without breaking things.
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
!
- Create
nginx
virtual host by copying overlaravel.conf.example
- Edit
/etc/hosts
(if given permission) - Create a database and a user for development
- Create a database and a user for testing
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!
-
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!
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.