hexo部署到私人服务器

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial

仓库同步

1
2
3
4
5
6
7
yum install git -y
mkdir /data/GitLibrary
mkdir -p /data/www/hexo
git init --bare hexo.git
vim /data/GitLibrary/hexo.git/hooks/post-receive
# git --work-tree=/data/www/hexo --git-dir=/data/GitLibrary/hexo.git checkout -f
chmod +x /data/GitLibrary/hexo.git/hooks/post-receive

部署

1
2
3
docker run -d --restart=always \
-p 80:80 -v /data/www/hexo:/usr/share/nginx/html \
--name=hexo-blog nginx