docker上一键部署lnmp。具体步骤可到我的简书查看 Docker deploying Nginx MySQL PHP7 in one key, support full feature functions.
- 完全开源 Completely open source.
- 支持多版本PHP切换(PHP5.4、PHP5.6、PHP7.2...) Support Multiple PHP version(PHP5.4, PHP5.6, PHP7.2) switch.
- 支持绑定任意多个域名 Support Multiple domains.
- 支持HTTPS和HTTP/2 Support HTTPS and HTTP/2.
- PHP源代码位于宿主机中 PHP source located in host.
- MySQL data位于宿主机中 MySQL data directory in host.
- 所有配置文件可在宿主机中直接修改 All conf files located in host.
- 所有日志文件可在宿主机中直接查看 All log files located in host.
- 内置完整PHP扩展安装命令 Built-in PHP extensions install commands.
- 实现一次配置,Windows、Linux、MacOs皆可用 Supported any OS with docker.
- Install
git
,docker
anddocker-compose
; - Clone project:$ git clone https://github.com/shmilylbelva/dnmp.git
- Start docker containers:You may need use
sudo
before this command in Linux. - Go to your browser and type
localhost
, you will see:
The index file is located in ./www/site1/
.
Default, we start LATEST PHP version by using:
we can also start PHP5.4 or PHP5.6 by using:
We need not change any other files, such as nginx config file or php.ini, everything will work fine in current environment (except code compatibility error).
Notice: We can only start one php version, for they using same port. We must STOP the running project then START the other one.
Default demo include 2 sites:
To preview them, add 2 lines to your hosts file (at /etc/hosts
on Linux and C:\Windows\System32\drivers\etc\hosts
on Windows):
Then you can visit from browser.
We can identify log directory in nginx / php / php-fpm / mysql config file. To display the log file in host
MIT