usdocker-lemp v1.0.4
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/sitesInstalling
npm install -g usdocker-lempRunning
usdocker mysql up # installed as dependency
usdocker lemp upCheck the status
usdocker lemp statusDown the server
usdocker lemp downServing domains
If you wanna serve pages for domain "example.com" you just have to create a folder:
usdocker lemp domain-add example.comAnd 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/publicIf 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:
usdocker lemp domain-add example.com /path/to/file.tar.gzRemove a domain
usdocker lemp domain-del example.comList served domains
usdocker lemp domain-listCustomize your Service
You can setup the variables by using:
usdocker lemp --set variable=valueDefault 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)