Docker + nginx + MySQL + PHP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
xiaoz fb714279c9 fix bug 3 weeks ago
mysql 添加运行脚本 3 years ago
nginx 废弃PHP 7.4 3 weeks ago
php74 添加运行脚本 3 years ago
php83 fix bug 3 weeks ago
redis Update redis.conf 2 years ago
wwwroot/default 优化nginx,添加定时配置检测 3 years ago
.env.simple 一些优化 2 years ago
LICENSE Initial commit 6 years ago
README.md 废弃PHP 7.4 3 weeks ago
dnmp.sh 废弃PHP 7.4 3 weeks ago
docker-compose.yaml 废弃PHP 7.4 3 weeks ago

README.md

DNMP

Learn more about how DNMP can streamline your development process and make your projects more efficient.

Install

git clone https://github.com/helloxz/dnmp.git
cd dnmp
bash dnmp.sh run
# install phpmyadmin
bash dnmp.sh install runtime
bash dnmp.sh install phpmyadmin

PHP 版本

版本 容器名 FastCGI 端口 目录
PHP 8.3(默认启动) php-8.3 127.0.0.1:9083 php83
PHP 7.4(按需启动) php-7.4 127.0.0.1:9074 php74

bash dnmp.sh run 启动的是 PHP 8.3;需要 PHP 7.4 时执行 bash dnmp.sh start php74。站点使用哪个版本由 nginx vhost 里的 fastcgi_pass 端口决定,参考 nginx/conf/vhost/site.conf.example。

PHP 8.3 镜像需要自行构建并推送(Docker Hub 上的 helloz/php 只提供 7.4):

cd php83
docker build -t helloz/php:8.3-fpm-alpine .
docker push helloz/php:8.3-fpm-alpine

Common commands

# reload nginx config
docker exec -it nginx xc.sh reload

# start / stop PHP 7.4 on demand
bash dnmp.sh start php74
bash dnmp.sh stop php74

# check php version
docker exec php-8.3 php -v