Start LNMP(LEMP) In less than 2 minutes Powered by Docker Compose. 使用 Docker Compose 一键搭建 LNMP(LEMP) 开发环境和生产环境(集群)!LNMP(LEMP) 云原生应用解决方案
CI/CD 自动测试部署 Docker 化 PHP 项目最佳实践示例 || $ composer create-project --prefer-dist khs1994/example example
https://khs1994-docker.gitee.io/ | khs1994-docker/lnmp Docs
: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 |
| macOS | CI |
| Linux arm64v8 | - |
:warning: Run Laravel on Docker For Windows very slow. solve it.
Welcome developer subscribe WeChat
To use LNMP Docker, you need:
:one: Docker 20.10 Stable +
Please see Windows 10.
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
$ cd lnmp $ ./lnmp-docker up $ curl 127.0.0.1 Welcome use khs1994-docker/lnmp v20.10 x86_64 With Pull Docker Image development
:bulb: MySQL default root password mytest
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_ROOTto change PHP project folder.
More information please see Docker PHP Best Practice 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');
lnmp-php
lnmp-composer
lnmp-phpunit
lnmp-laravel
...
For more information please see Documents
Please set API key and id in
.envfile or System ENV. Support Self-Signed SSL certificate, for more information, see Documents.
$ docker container ls -a -f label=com.khs1994.lnmp
Edit Dockerfile in ./dockerfile/*/Dockerfile, then exec ./lnmp-docker build.
# Restart all container $ ./lnmp-docker restart $ ./lnmp-docker restart nginx php8
$ ./lnmp-docker stop
$ ./lnmp-docker down
| Name | Docker Image | Version | Based | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NGINX | nginx:1.23.3-alpine |
1.23.3 | alpine:3.13 |
|||||||||||||
| HTTPD | httpd:2.4.53-alpine |
2.4.53 | alpine:3.16 |
|||||||||||||
| MariaDB | mariadb:10.8.3 |
10.8.3 | ubuntu:jammy |
|||||||||||||
| PHP-FPM | khs1994/php:8.2.3-fpm-alpine |
8.2.3 | alpine:3.16 |
|||||||||||||
| Memcached | memcached:1.6.15-alpine |
1.6.15 | alpine:3.16 |
|||||||||||||
| PostgreSQL | postgres:14.0-alpine |
14.0 | alpine:3.14 |
|||||||||||||
| PHPMyAdmin | phpmyadmin:5.2.0 |
5.2.0 | alpine:3.16 |
|||||||||||||
Folder Structure
Exposed Ports
CLIEasy to generate nginx or apache config, etc. Please use Who use in Production?khs1994.comHTTP3/QUICPlease see Contributing ThanksMore Information
DonateWe send OS type and IP data to us data collection server, please set true (default) to help us improve. You can edit
仓库语言
成员(1)
khs1994
点此查找更多帮助
搜索帮助回到顶部
|