github地址: https://github.com/yeszao/dnmp
如果没有git则先安装即可。拉取指定tag版代码,这里以v1.1-17.10.30 为例
git clone --branch [tags标签] [git远程仓库地址]
git clone --branch v2.0.5 git@github.com:yeszao/dnmp.git
安装docker引擎
https://docs.docker.com/engine/install/centos/#install-using-the-repository
https://docs.docker.com/compose/install/
https://docs.docker.com/compose/install/compose-plugin/#installing-compose-on-linux-systems
下载docker desktop(如下链接)并安装即可:ps:自动支持docker engine 与 docker-compose(如果没找到命令,就关闭terminal重新打开就有了)
https://docs.docker.com/desktop/mac/install/
git clone --branch [tags标签] [git远程仓库地址]
git clone --branch v1.1-17.10.30-release git@github.com:typecho/typecho.git
①:先预创建一个typecho库
②:数据库默认连接参数:host:mysql5 user:root pwd:123456
③:注意dnmp docker-compose默认使用的mysql版本比较高,可以自行降低mysql版本,typecho不支持8.0)
server {
listen 80;
server_name localhost;
root /www/build/;
index index.html index.htm index.php;
access_log /dev/null;
#access_log /var/log/nginx/nginx.localhost.access.log main;
error_log /var/log/nginx/nginx.localhost.error.log warn;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ .*\.php(\/.*)*$ {
fastcgi_pass php:9000;
#include fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 443 default ssl http2;
server_name localhost;
root /www/build/;
index index.php index.html index.htm;
access_log /dev/null;
error_log /var/log/nginx/nginx.localhost.error.log warn;
ssl_certificate /ssl/localhost/localhost.crt;
ssl_certificate_key /ssl/localhost/localhost.key;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ .*\.php(\/.*)*$ {
fastcgi_pass php:9000;
#include fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
typecho:
https://github.com/typecho/typecho
dnmp:
https://github.com/yeszao/dnmp
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。