# usdocker-lemp

> USDocker script for create a LEMP server in seconds.

Latest version **1.0.4** (published 2017-08-29) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install usdocker-lemp
pnpm add usdocker-lemp
yarn add usdocker-lemp
bun add usdocker-lemp
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-08-29 |
| First published | 2017-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Author | joao@byjg.com.br |
| Maintainers | byjg |
| Keywords | usdocker, lemp |

## Links

- npm: https://www.npmjs.com/package/usdocker-lemp
- Repository: https://github.com/usdocker/usdocker-lemp
- Homepage: https://github.com/usdocker/usdocker-lemp#readme
- Issues: https://github.com/usdocker/usdocker-lemp/issues
- npm.io page: https://npm.io/package/usdocker-lemp

## Dependencies (1)

- [targz](https://npm.io/package/targz.md) ^1.0.1

## Recent versions

- 1.0.4 (latest) — 2017-08-29
- 1.0.3 — 2017-08-20
- 1.0.2 — 2017-08-19
- 1.0.1 — 2017-08-19
- 1.0.0 — 2017-08-18

## README

# USDocker Generic LEMP Server

This Useful Script creates a really generic NGINX+PHP+MYSQL server from a Docker image.
You don't know docker to use this solution.  

The server will be recognize the domain and select dynamically the folder where this domain will be serve pages.

The default ROOT for the server is:

```
$HOME/.usdocker/data/lemp/sites
```

## Installing

```bash
npm install -g usdocker-lemp
```

## Running

```bash
usdocker mysql up    # installed as dependency
usdocker lemp up
```

Check the status

```bash
usdocker lemp status
```

Down the server

```bash
usdocker lemp down
```

## Serving domains

If you wanna serve pages for domain "example.com" you just have to create a folder:

```bash
usdocker lemp domain-add example.com
```

And you will serve pages for this domain immediatelly. 
This script tries to find the follow directories to server web pages:

- web
- httpdocs
- public 

If found, the directory for the web pages will be, respectively:

```
$HOME/.usdocker/data/lemp/sites/example.com/web
or
$HOME/.usdocker/data/lemp/sites/example.com/httpdocs
or
$HOME/.usdocker/data/lemp/sites/example.com/public
```

If not found will serve the root directory directly

### Serve a domain with a previous specific content

Optionally, you can create a domain with a pre-defined content existing in a tar.gz file. 
 
To do this execute:

```bash
usdocker lemp domain-add example.com /path/to/file.tar.gz
```

### Remove a domain

```bash
usdocker lemp domain-del example.com
```

### List served domains

```bash
usdocker lemp domain-list
```

## Customize your Service

You can setup the variables by using:

```bash
usdocker lemp --set variable=value
```

Default values

 - image: "byjg/php7-fpm-nginx:alpine",
 - folder: "$HOME/.usdocker/data/lemp",
 - port: 80,
 - sslPort: 443,
 - applicationEnv: "dev" (will set APPLICATION_ENV environment variable to PHP)

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