npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@usdocker/lemp

v1.0.13

Published

USDocker script for create a LEMP server in seconds.

Downloads

7

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

npm install -g @usdocker/usdocker # Install it first
npm install -g @usdocker/mysql @usdocker/lemp
usdocker -r    # Update USDocker database

Running

usdocker mysql up    # installed as dependency
usdocker lemp up

Check the status

usdocker lemp status

Down the server

usdocker lemp down

Serving domains

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

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:

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

Remove a domain

usdocker lemp domain-del example.com

List served domains

usdocker lemp domain-list

Export/backup domains

usdocker lemp export [domain] [dest folder]

Windows Know Problems

Q: I am getting no error but the service is not started OR I am getting the error: "docker error userland proxy: Bind for 0.0.0.0:80: unexpected error Permission denied. windows"

A: This error occured because the port 80 is already binded. Try to Shutdown the Skype and/or stop the "World Wide Web Service" (net stop http)

Customize your Service

You can setup the variables by using:

usdocker lemp --set variable=value

Default values

  • image: "byjg/php:7-fpm-nginx",
  • folder: "$HOME/.usdocker/data/lemp",
  • port: 80,
  • sslPort: 443,
  • applicationEnv: "dev" (will set APPLICATION_ENV environment variable to PHP)
  • phpHandler: "/app.php" (you can change to another or =404 for ignore phpHandler)
  • enableCors: 'true'
  • corsAllowOrigin: '*';
  • nginxDebugHeader: 'true'
  • phpDebugHeader: 'true'