Skip to content

Commit

Permalink
[feature] dnmp v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
telanflow committed Jul 5, 2021
1 parent bfeffe8 commit d03861e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ DNMP 可以构建出基于 Docker 的 PHP 开发环境,其优势有在短时
sudo docker-compose up --build -d

# 构建单个镜像并启动容器
sudo docker-compose up --build -d [nginx|php56|php74|php8 ...]

# 构建单个镜像
sudo docker-compose build --no-cache [nginx|php56|php74|php8 ...]

启动成功访问 http://localhost 即可
Expand All @@ -55,11 +58,17 @@ DNMP 可以构建出基于 Docker 的 PHP 开发环境,其优势有在短时
sudo docker-compose ps

# 启动部分服务在后边加服务名,不加表示启动所有,-d 表示在后台运行
sudo docker-compose up [nginx|php56|php74|php8 ...] -d
sudo docker-compose up -d [nginx|php56|php74|php8 ...]

# 停止和启动类似
# 启动容器
sudo docker-compose start [nginx|php56|php74|php8 ...]

# 停止容器
sudo docker-compose stop [nginx|php56|php74|php8 ...]

# 重启容器
sudo docker-compose restart [nginx|php56|php74|php8 ...]

# 停止并删除相关的容器
sudo docker-compose down [nginx|php56|php74|php8 ...]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
location ~ \.php$ {
fastcgi_pass dnmp-php73:9000;
fastcgi_pass dnmp-php8:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/vhost/localhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ server {
root /etc/nginx/html;

# include /etc/nginx/rewrite/wordpress.conf;
include /etc/nginx/rewrite/php74.conf;
include /etc/nginx/rewrite/php8.conf;

access_log /var/log/nginx/localhost-access.log;
error_log /var/log/nginx/localhost-error.log;
Expand Down
6 changes: 3 additions & 3 deletions config/nginx/vhost/localhost.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ server {

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# Or include php56.conf php73.conf php74.conf
# Or include php56.conf php74.conf php8.conf
#
# include /etc/nginx/rewrite/php56.conf;
# include /etc/nginx/rewrite/php73.conf;
# include /etc/nginx/rewrite/php74.conf;
# include /etc/nginx/rewrite/php8.conf;
#
location ~ \.php$ {
fastcgi_pass php74:9000;
fastcgi_pass php8:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
Expand Down
2 changes: 1 addition & 1 deletion www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<p align="center" class="mine">
<span>DNMP</span>
<span class="subtitle">v1.2.1</span>
<span class="subtitle">v1.3</span>
</p>

<div class="desc" align="center">
Expand Down

0 comments on commit d03861e

Please sign in to comment.