diff --git a/README.md b/README.md index eee258b..46b936b 100644 --- a/README.md +++ b/README.md @@ -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 即可 @@ -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 ...] diff --git a/config/nginx/rewrite/php73.conf b/config/nginx/rewrite/php8.conf similarity index 81% rename from config/nginx/rewrite/php73.conf rename to config/nginx/rewrite/php8.conf index 6b728fd..26a7955 100644 --- a/config/nginx/rewrite/php73.conf +++ b/config/nginx/rewrite/php8.conf @@ -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; diff --git a/config/nginx/vhost/localhost.conf b/config/nginx/vhost/localhost.conf index 7d8e709..579ce50 100755 --- a/config/nginx/vhost/localhost.conf +++ b/config/nginx/vhost/localhost.conf @@ -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; diff --git a/config/nginx/vhost/localhost.example b/config/nginx/vhost/localhost.example index 861ee0b..528c73a 100755 --- a/config/nginx/vhost/localhost.example +++ b/config/nginx/vhost/localhost.example @@ -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; diff --git a/www/index.php b/www/index.php index ada76bb..a17faac 100755 --- a/www/index.php +++ b/www/index.php @@ -49,7 +49,7 @@

DNMP - v1.2.1 + v1.3