Giter Site home page Giter Site logo

1569501393 / lnmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khs1994-docker/lnmp

0.0 2.0 0.0 5.72 MB

:computer: :whale: :elephant: :dolphin: :penguin: :rocket: Start Docker LNMP(LEMP) In less than 2 minutes Powered by Docker Compose. 让 PHP 开发者快速(一键)搭建基于容器技术(Docker、Kubernetes)的开发、测试、生产(CI/CD by Drone)环境.

Home Page: https://docs.lnmp.khs1994.com

License: Apache License 2.0

Dockerfile 100.00%

lnmp's Introduction

LNMP Docker

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

star

💻 🐳 🐘 🐬 🐧 🚀 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.

⚠️ Don't Edit Any Files except .env Why ?

⚠️ Run Laravel on Docker For Windows very slow. solve it.

🎁 Donate

🐳 Try Kubernetes FREE

WeChat

Welcome developer subscribe WeChat

Prerequisites

To use LNMP Docker, you need:

1️⃣ Docker CE 19.03 Stable +

2️⃣ Docker Compose 1.24.0+

3️⃣ 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 [email protected]:khs1994-docker/lnmp.git

# **镜像

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

# $ git clone --depth=1 [email protected]: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

💡 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

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

$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 🐳

Try Kubernetes FREE

Advanced

PHP EOL

  • 7.0

More information please see https://github.com/khs1994-docker/lnmp/issues/354

Meet issues With MySQL 8.0 ?

Please see khs1994-docker#450

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.3 2.8.3 Alpine:3.10
NGINX nginx:1.17.6-alpine 1.17.6 Alpine:3.10
NGINX Unit khs1994/php:7.3.11-unit-alpine 1.12.0 Alpine:3.10
HTTPD httpd:2.4.41-alpine 2.4.41 Alpine:3.10
MySQL mysql:8.0.18 8.0.18 Debian:stretch
MariaDB mariadb:10.4.10 10.4.10 Ubuntu:bionic
Redis redis:5.0.7-alpine 5.0.7 Alpine:3.10
PHP-FPM khs1994/php:7.3.11-fpm-alpine 7.3.11 Alpine:3.10
Laravel khs1994/php:7.3.11-composer-alpine 6.x Alpine:3.10
Composer khs1994/php:7.3.11-composer-alpine 1.9.1 Alpine:3.10
PHP-CS-Fixer khs1994/php-cs-fixer 2.16.0 Alpine:3.10
Memcached memcached:1.5.20-alpine 1.5.20 Alpine:3.10
RabbitMQ rabbitmq:3.8.0-management-alpine 3.8.0 Alpine:3.10
PostgreSQL postgres:12.0-alpine 12.0 Alpine:3.10
MongoDB mongo:4.2.1 4.2.1 Ubuntu:bionic
PHPMyAdmin phpmyadmin/phpmyadmin:latest latest Alpine:3.10
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.

LinuxKit

# OS: macOS

$ cd linuxkit

$ linuxkit build lnmp.yml

$ linuxkit run -publish 8080:80/tcp lnmp

Open your Browers 127.0.0.1:8080

Who use in Production?

TLS1.3

Please see khs1994-docker#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 🐳

Try Kubernetes FREE

lnmp's People

Contributors

khs1994 avatar renovate[bot] avatar renovate-bot avatar khs1994-merge-robot avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.