Skip to content

🐳 The ultimate solution for Hexo blog deployment (cloud + domain name + Https + Nginx mirroring + Docker deployment)

License

Notifications You must be signed in to change notification settings

Chan-Chun/hexo-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hexo-docker

Docker Hub

Build

docker build -t hexo-docker .

My docker hub tag docker tag hexo-docker:latest chanchun/hexo-docker:latest

Run

docker run -v $(pwd)/letsencrypt:/etc/letsencrypt -d -p 80:80 -p 443:443 -p 8004:22 hexo-docker

Setting

First enter docker container

docker exec -it "[your_container_name]" /bin/bash

Let’s Encypt Setting

Creat certificate

certbot --nginx -d "[your_domain.com]"

Renew the certificate when it is about to expire

/usr/bin/certbot renew

Hexo Setting

mkdir ~/.ssh
echo "[your_ssh_public_key]" > ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
mkdir /run/sshd
/usr/sbin/sshd

Hexo Deploy

Hexo _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

About

🐳 The ultimate solution for Hexo blog deployment (cloud + domain name + Https + Nginx mirroring + Docker deployment)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published