Score
0
Watch 3 Star 11 Fork 1

khs1994-docker / lnmpDockerApache-2.0

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Start LNMP(LEMP) In less than 2 minutes Powered by Docker Compose. 使用 Docker Compose 一键搭建 LNMP(LEMP) 开发环境和生产环境(集群)!LNMP(LEMP) 云原生应用解决方案 spread retract

https://lnmp.khs1994.com

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

LNMP Docker

GitHub stars Build Status GitHub release GitHub (pre-)release license Build Status

star

:computer: :whale: :elephant: :dolphin: :penguin: :rocket: Start LNMP In Less than 2 minutes Powered By Docker Compose, one command $ ./lnmp-docker up

Platform Status
Windows Build status
Linux Build Status
macOS Build Status
Linux arm64v8 -
Linux arm32v7 -

LNMP Docker is supported on Linux, macOS, Windows 10 on x86_64, and Debian (Raspberry Pi3) on arm.

:warning: Don't Edit Any Files except .env Why ?

:warning: Run Laravel on Docker For Windows very slow. solve it.

:gift: Donate

:whale: 腾讯云 Kubernetes

WeChat

Welcome developer subscribe WeChat

Prerequisites

To use LNMP Docker, you need:

:one: Git

:two: Docker CE 19.03 Stable +

:three: Docker Compose 1.25.0+

:four: WSL (Windows Only)

Quick Start

Windows 10

Please see Windows 10.

Install

Use git install LNMP Docker.

$ git clone --depth=1 https://github.com/khs1994-docker/lnmp.git

# $ git clone --depth=1 git@github.com:khs1994-docker/lnmp.git

# 中国镜像

$ git clone --depth=1 https://gitee.com/khs1994-docker/lnmp.git

# $ git clone --depth=1 git@gitee.com:khs1994-docker/lnmp.git

Start LNMP Demo

$ cd lnmp

$ ./lnmp-docker up

$ curl 127.0.0.1

Welcome use khs1994-docker/lnmp v19.03 x86_64 With Pull Docker Image

development

:bulb: MySQL default root password mytest

Start PHP Project

Create new folder to start PHP project(e.g, Laravel) in ./app/ folder, And edit nginx config file in ./config/nginx/yourfilename.conf.

# $ ./lnmp-docker new

$ ./lnmp-docker restart nginx

You can set APP_ROOT to change PHP project folder.

More information please see Docker PHP Best Practice https://github.com/khs1994-docker/php-demo

How to connect Services

:no_entry: $redis->connect('127.0.0.1',6379);

:no_entry: $pdo = new \PDO('mysql:host=127.0.0.1;dbname=test;port=3306','root','mytest');

$redis = new \Redis();

$redis->connect('redis', 6379);

$pdo = new \PDO('mysql:host=mysql,dbname=test,port=3306', 'root', 'mytest');

AD :whale:

腾讯云 Kubernetes

Advanced

PHPer commands

  • lnmp-php

  • lnmp-composer

  • lnmp-phpunit

  • lnmp-laravel

  • ...

For more information please see Documents

Issue SSL certificate

Powered by acme.sh

$ ./lnmp-docker ssl khs1994.com -d *.khs1994.com

Please set API key and id in .env file or System ENV. Support Self-Signed SSL certificate, for more information, see Documents.

List LNMP Container

$ docker container ls -a -f label=com.khs1994.lnmp

Use Self-Build Docker Image

Edit Dockerfile in ./dockerfile/*/Dockerfile, then exec ./lnmp-docker build.

Restart

# Restart all container
$ ./lnmp-docker restart

$ ./lnmp-docker restart nginx php7

Stop

$ ./lnmp-docker stop

Stop and remove

$ ./lnmp-docker down

Overview

Features

Please see Documents.

What's inside

Name Docker Image Version Based
ACME.sh khs1994/acme:2.8.6 2.8.6 alpine:3.11
NGINX nginx:1.17.10-alpine 1.17.10 alpine:3.11
NGINX Unit khs1994/php:7.4.6-unit-alpine 1.17.0 alpine:3.11
HTTPD httpd:2.4.43-alpine 2.4.43 alpine:3.11
MySQL mysql:8.0.20 8.0.20 debian:buster-slim
MariaDB mariadb:10.5.3 10.5.3 ubuntu:bionic
Redis redis:6.0.3-alpine 6.0.3 alpine:3.11
PHP-FPM khs1994/php:7.4.6-fpm-alpine 7.4.6 alpine:3.11
Composer khs1994/php:7.4.6-composer-alpine 1.10.6 alpine:3.11
Memcached memcached:1.6.6-alpine 1.6.6 alpine:3.11
RabbitMQ rabbitmq:3.8.3-management-alpine 3.8.3 alpine:3.11
PostgreSQL postgres:12.3-alpine 12.3 alpine:3.11
MongoDB mongo:4.2.6 4.2.6 ubuntu:bionic
PHPMyAdmin phpmyadmin/phpmyadmin:latest latest alpine:3.11
Registry registry:latest latest alpine:3.8

Folder Structure

Folder description
app PHP project (HTML, PHP, etc)
backup backup database file
bin PHPer Commands
config configuration file
dockerfile Dockerfile
log log file
scripts bash shell script

Exposed Ports

  • 80
  • 443
  • 8080 PHPMyAdmin (Development only)

CLI

Easy to generate nginx or apache config, etc. Please use ./lnmp-docker.

Run in Production

Start Containers as a Service(CaaS). For more information, see Documents.

Who use in Production?

khs1994.com

PCIT -- PHP CI TOOLKIT

TLS1.3

Please see https://github.com/khs1994-docker/lnmp/issues/137

CI/CD

Please see khs1994-docker/ci

Documents

https://docs.lnmp.khs1994.com

Contributing

Please see Contributing

Thanks

More Information

Donate

Please see https://zan.khs1994.com

Privacy

We send OS type and IP data to us data collection server, please set true (default) to help us improve.

You can edit .env file DATA_COLLECTION=false to disable it.

AD :whale:

腾讯云 Kubernetes

Docker
1
https://gitee.com/khs1994-docker/lnmp.git
git@gitee.com:khs1994-docker/lnmp.git
khs1994-docker
lnmp
lnmp
master

Help Search

205735 778617b6 1899542 205747 347fc4a1 1899542