从静态到全栈 —— Project Dashboard 部署 + VPS Monitor 完善

六、踩过的坑总结

坑现象解决
Git remote 是内部 Git无法控制换成自己的 GitHub
首次 push 要认证密码被拒用 Personal Access Token
Author identity unknownGit 没配置git config –global user.name/email
ufw 防火墙阻挡本地 200,外部打不开ufw allow 3004/tcp
Nginx 服务名不具体显示为 nginx加 config/services.json
Web 服务混入 K8s 端口31 个(含系统)加 type 字段区分

七、关键命令速查

# Mac(Git)
git remote set-url origin https://github.com/USER/REPO.git
git add . && git commit -m "update" && git push

# VPS(部署)
git clone https://github.com/USER/REPO.git
cp -r dist/* /var/www/SITE/
nginx -t && systemctl reload nginx
ufw allow PORT/tcp

# VPS(更新)
cd /root/REPO
git pull
cp -r dist/* /var/www/SITE/
bash /root/update-xxx.sh

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注