# multi-laradock

> Help with multiple sites Laradock configuration

Latest version **0.0.3** (published 2018-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install multi-laradock
pnpm add multi-laradock
yarn add multi-laradock
bun add multi-laradock
```

Provides the command `multi-laradock`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-11-29 |
| First published | 2018-11-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Demetrio Carrara |
| Maintainers | sgametrio |
| Keywords | laradock, cli, multilaradock |

## Links

- npm: https://www.npmjs.com/package/multi-laradock
- Repository: https://github.com/sgametrio/multi-laradock
- Homepage: https://github.com/sgametrio/multi-laradock#readme
- Issues: https://github.com/sgametrio/multi-laradock/issues
- npm.io page: https://npm.io/package/multi-laradock

## Dependencies (5)

- [colors](https://npm.io/package/colors.md) ^1.3.2
- [dotenv](https://npm.io/package/dotenv.md) ^6.1.0
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.2
- [commander](https://npm.io/package/commander.md) ^2.19.0
- [sudo-prompt](https://npm.io/package/sudo-prompt.md) ^8.2.3

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2018-11-29
- 0.0.2 — 2018-11-22
- 0.0.1 — 2018-11-13

## README

# 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:

```shell
+ 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:

```bash
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.

---
_Source: https://npm.io/package/multi-laradock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
