docker build -t hexo-docker .My docker hub tag
docker tag hexo-docker:latest chanchun/hexo-docker:latest
docker run -v $(pwd)/letsencrypt:/etc/letsencrypt -d -p 80:80 -p 443:443 -p 8004:22 hexo-dockerFirst enter docker container
docker exec -it "[your_container_name]" /bin/bashCreat certificate
certbot --nginx -d "[your_domain.com]"Renew the certificate when it is about to expire
/usr/bin/certbot renewmkdir ~/.sshecho "[your_ssh_public_key]" > ~/.ssh/authorized_keyschmod 600 ~/.ssh/authorized_keyschmod 700 ~/.sshmkdir /run/sshd/usr/sbin/sshdHexo _config.yml
deploy:
type: git
repo: root@hexo-test:/root/blogs.git
branch: master~/.ssh/config
Host hexo-test
HostName [your_remote_server_ip]
Port 8004