Apache License 2.0

项目介绍

khs1994-docker/lnmp 是一个托管在 GitHub 上的开源项目,主要使用 Dockerfile 编写,采用 Apache License 2.0 许可证,目前获得 667 个 Star、128 次 Fork。

仓库全名
khs1994-docker/lnmp
开源许可证
Apache License 2.0
Star 数
667
Fork 数
128
未关闭 Issue
55

README 摘要

LNMP Docker :computer: :whale: :elephant: :dolphin: :penguin: :rocket: Start LNMP In Less than 2 minutes Powered By Docker Compose, one command $ ./lnmp-docker up Platform | Status | Linux arm64v8 | - | 中文说明 Documents 【腾讯云】云服务器限时秒杀,1核2G首年99元! Asciinema Live Demo Feedback TODO Best Practice Donate LNMP Docker is supported on Linux, macOS, Windows 10 on x8664, and Debian (Raspberry Pi3) on arm. :warning: Don't Edit…

完整内容见 GitHub 原始 README 或本页 。

常见问题

lnmp 用什么语言开发?

主要使用 Dockerfile 编写,采用 Apache License 2.0 许可证,目前有 667 个 Star。

lnmp 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 lnmp 的源码?

可以直接克隆仓库:git clone https://github.com/khs1994-docker/lnmp.git,默认分支为 25.11;安装与运行步骤见仓库 README。

lnmp 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 55 个未关闭 Issue;Star 数为 667,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

: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)环境.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
935
价值分
437
活跃状态
活跃

语言占比

Dockerfile

Release

README

LNMP Docker

GitHub stars 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 CI
Linux arm64v8 -

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

WeChat

Welcome developer subscribe WeChat

Prerequisites

To use LNMP Docker, you need:

:one: Git

:two: Docker 23.11 Stable +

:three: Docker Compose v2.17.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 [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 v23.11 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

$redis = new \Redis();

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

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

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 php8

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:3.0.0 3.0.0 alpine:3.16
NGINX nginx:1.25.3-alpine 1.25.3 alpine:3.13
NGINX Unit khs1994/php:8.3.0-unit-alpine 1.30.0 alpine:3.16
HTTPD httpd:2.4.53-alpine 2.4.53 alpine:3.16
MySQL mysql:8.0.33 8.0.33 oraclelinux:8-slim
MariaDB mariadb:10.11.5 10.11.5 ubuntu:jammy
Redis redis:7.0.0-alpine 7.0.0 alpine:3.16
PHP-FPM khs1994/php:8.3.0-fpm-alpine 8.3.0 alpine:3.19
Composer khs1994/php:8.3.0-composer-alpine 2.5.8 alpine:3.19
Memcached memcached:1.6.15-alpine 1.6.15 alpine:3.16
RabbitMQ rabbitmq:3.9.0-management-alpine 3.9.0 alpine:3.13
PostgreSQL postgres:14.0-alpine 14.0 alpine:3.14
MongoDB mongo:5.0.3 5.0.3 ubuntu:bionic
PHPMyAdmin phpmyadmin:5.2.0 5.2.0 alpine:3.16
Registry registry:latest latest alpine:3.11

Folder Structure

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

Exposed Ports

  • 80
  • 443

CLI

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

Who use in Production?

khs1994.com

PCIT – PHP CI TOOLKIT

HTTP3/QUIC

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

CI/CD

Please see khs1994-docker/ci

Documents

https://docs.lnmp.khs1994.com

Contributing

Please see Contributing

Thanks

More Information

Please see https://zan.khs1994.com

评论

暂无评论