原来网站是基于 lnmp 的。管理起来也确实没有什么不方便,只是尝试用 1panel 进行管理(本来考虑用 bt 的)。但试试1panel 后感觉还行就尝试全部切到1panel 上看看效果。
当前就已经跑在1panel 上了。运行一段时间看看效果先。为什么这样呢,是尝试先这样用 nginx+runtime打包,后续看是不是打成 image。进行自动化部署。
1panel 本身也有 API,这样就可以自动初始化,自动打包发布了
膘叔的简单人生
原来网站是基于 lnmp 的。管理起来也确实没有什么不方便,只是尝试用 1panel 进行管理(本来考虑用 bt 的)。但试试1panel 后感觉还行就尝试全部切到1panel 上看看效果。
当前就已经跑在1panel 上了。运行一段时间看看效果先。为什么这样呢,是尝试先这样用 nginx+runtime打包,后续看是不是打成 image。进行自动化部署。
1panel 本身也有 API,这样就可以自动初始化,自动打包发布了
在家里的小机器上安装了1panel,并装了一个 domain-admin,用来监控 let's 的SSL 签名。确实因为有时候 let's 不签了。这种情况往往出在泛域名或者多签的时候 。因为偷懒,一台机器上的域名,全部采用了 acme 进行多签,导致同时签 N 个域名时,有一个失败,就会失败了。
在更新 pnpm i 的时候 ,报错,提示 swagger-api 最后的 版本是0.98,但代码里是0.99,所以感到有点郁闷 。到网上查了一下,最新版确实是0.99
于是切换源为:npm config set registry http://mirrors.cloud.tencent.com/npm/,然后再次更新。已经是0.99了。
随便想了想,应该是这个 npm 的镜像更新没有到最新。。还是得少用,或者自己做一个常用的镜像,以防万一啊
Mac下以前用valet,但由于都是命令行(其实也挺方便)。后面又出了Herd,用起来确实比原来舒服多了,至少使用不同版本的PHP时,就没啥大问题。
在部署项目的时候 。先git clone完项目后,再次使用git pull/git fetch的时候 ,就会报这个错误:
在Debian下,按照官方的教程进行gpg和source的添加时,在apt update时会报错 NO_PUBKEY的错误
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
2、UPDATE
sudo apt update
用unoconv将wod转成pdf的时候,中文乱码,这时候解决方案往往是上传中文字体到系统库并注册即可。
# 使mkfontscale和mkfontdir命令正常运行
sudo apt-get install ttf-mscorefonts-installer
# 使fc-cache命令正常运行
sudo apt-get install fontconfig
在尝试使用 envoy 尝试自动部署的时候,遇到了问题,即:如果我要自己创建一个新的域名,那只能上线去执行 lnmp vhost add 的命令。
sudo /usr/bin/expect<<EOF
spawn lnmp vhost add
expect {
"Please enter domain" {send "{{$host}}\n";exp_continue}
"Enter more domain name" {send "\n";exp_continue}
"Please enter the directory" {send "\n";exp_continue}
"Allow Rewrite rule" {send "y\n";exp_continue}
"Default rewrite" {send "laravel\n";exp_continue}
"Enable PHP Pathinfo" {send "\n";exp_continue}
"Allow access log" {send "\n";exp_continue}
"Enable IPv6" {send "\n";exp_continue}
"Enter your choice " {send "\n";exp_continue}
"Add SSL Certificate" {send "\n";exp_continue}
"Press any key to start" {send "\r"; exp_continue}
}
expect eof
EOF
@task('lnmp' ,['on'=>'dev'])
@if($force)
sudo rm -rf /usr/local/nginx/conf/vhost/{{$host}}.conf
sudo rm -rf /home/wwwroot/{{$host}}
@endif
sudo /usr/bin/expect<<EOF
spawn lnmp vhost add
expect {
"Please enter domain" {send "{{$host}}\n";exp_continue}
"Enter more domain name" {send "\n";exp_continue}
"Please enter the directory" {send "\n";exp_continue}
"Allow Rewrite rule" {send "y\n";exp_continue}
"Default rewrite" {send "laravel\n";exp_continue}
"Enable PHP Pathinfo" {send "\n";exp_continue}
"Allow access log" {send "\n";exp_continue}
"Enable IPv6" {send "\n";exp_continue}
"Enter your choice " {send "\n";exp_continue}
"Add SSL Certificate" {send "\n";exp_continue}
"Press any key to start" {send "\r";}
}
expect eof
EOF
ls -lah /home/wwwroot/
@endtask
这样就 OK 了
买了个 M8s 和 M9,M8s 买的比较早,还是 N6000,于是在上面装了个 sentry,准备替换掉我在轻量服务器上装的这个玩意。但发现有点小浪费,再加上sentry 是直接通过 install.sh 来安装的。很多东西没办法更好的处理,于是先买了台 M9,上了32G 内存,准备用来跑跑虚拟器啥的。考虑在上面再安装一下这个 sentry,将 M8s 和我的轻量解放出来。
先是安装了 ubuntu,有时候 你不得不承认 ubuntu 的兼容性是真的好。所有的驱动都认出来了。为什么这么说呢?因为我后面是想尝试用 omv 来处理,毕竟我还要管理 docker 之类的,用这个会更方便。而且我还特地买了1T 的硬盘。
结果 。。。omv 的安装在第一步就卡住了,网卡认不出。eth 不行,wifi 也不行。。从网上下了驱动。也没认出来。一下子傻眼了,在写的时候 ,我已经在下载 unraid 了。如果它能够跑出来,那我后面就改用 unraid 了。反正 unraid 也不贵。
说白了,就是给这个5-1找点事情做做
听起来好象没问题,因为 acme.sh 就是在做这样的事情,但事实上呢,经常失败。经常有客户跑过来说,怎么网站打不开了?所以找了个检查 SSL 证书的命令,然后放在 console 里跑一下,如果证书在7天内过期就使用 acme.sh 脚本运行一次。