README
It’s obsolete. Now I use Hugo instead of Hexo.
Introduction
My Hexo is running in Docker. It watches files of the blog, and generates the static files for Apache HTTP server.
Build the image
Get a Dockerfile.
cd $WorkDir
git clone https://github.com/spurin/docker-hexo.git
Remove Hexo Admin, add Supervisor for process manager and use a script start.sh to run hexo.
Build the image.
docker build -t hexo $WorkDir
Run the container
Use Docker Compose to run hexo service.
services:
hexo:
container_name: hexo
image: hexo
user: '1001'
volumes:
- /hexo/spacedust:/app
tty: true
The user 1001 is added for hexo and own /hexo/spacedust.
Docker Compose for build and run
services:
hexo:
container_name: hexo
build: $WorkDir
user: '1001'
volumes:
- /hexo/spacedust:/app
tty: true
Update the blog
The Hexo repository /hexo/spacedust is synchronized with a remote repository by user 1001. Push changes to the remote repository, then pull them to /hexo/spacedust.
P.S.
The icon of Kumo is form MDI project and the banner of Space Dust is from Unsplash.