mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-12-13 09:36:44 +00:00
update hexo README
This commit is contained in:
@@ -10,4 +10,4 @@ ADD bootstrap.sh /etc/bootstrap.sh
|
|||||||
|
|
||||||
WORKDIR /blog
|
WORKDIR /blog
|
||||||
|
|
||||||
CMD ["/etc/bootstrap.sh", "development"]
|
ENTRYPOINT ["/etc/bootstrap.sh", "development"]
|
||||||
|
|||||||
@@ -1,21 +1,32 @@
|
|||||||
https://hexo.io/zh-cn/
|
# Dockered Hexo
|
||||||
|
|
||||||
http://theme-next.iissnan.com/
|
## What is `Hexo`
|
||||||
|
|
||||||
First Time(not inited):
|
> `Hexo` is a fast, simple and powerful blog framework. You write posts in Markdown (or other languages) and Hexo generates static files with a beautiful theme in seconds.
|
||||||
|
|
||||||
|
Documents: [Hexo](https://hexo.io/)
|
||||||
|
|
||||||
|
## How to setup your Hexo blog quickly
|
||||||
|
|
||||||
|
1. Create a new directory in your computer (for example: `/path/to/blog`)
|
||||||
|
2. Create a docker service using the following command
|
||||||
|
3. View http://localhost:4000 to see your running blog
|
||||||
|
|
||||||
|
```
|
||||||
docker service create \
|
docker service create \
|
||||||
--name hexo \
|
--name hexo \
|
||||||
--publish 80:4000 \
|
--replicas 1 \
|
||||||
-e GIT_EMAIL="me@newnius.com" \
|
--publish 4000:4000 \
|
||||||
-e GIT_NAME="newnius" \
|
--env GIT_EMAIL="username@example.com" \
|
||||||
--mount type=bind,source=/mnt/data/blog,target=/blog \
|
--env GIT_NAME="username" \
|
||||||
|
--mount type=bind,source=/path/to/blog,target=/blog \
|
||||||
newnius/hexo
|
newnius/hexo
|
||||||
|
```
|
||||||
|
|
||||||
Start Server:
|
## Notice
|
||||||
docker service create \
|
|
||||||
--name hexo \
|
_This command creates a docker swarm service, you can use `docker run ...` instead in your way_
|
||||||
--publish 80:4000 \
|
|
||||||
-e GIT_EMAIL="me@newnius.com" \
|
_The first time you run this command, it will init the blog and will take some time to install some packages._
|
||||||
-e GIT_NAME="newnius" \
|
|
||||||
--mount type=bind,source=/mnt/data/blog,target=/blog \
|
_If you live in China, the npm source mirror is blocked and the inititial may not be completed, you can download the required packages and put them where they should be._
|
||||||
newnius/hexo server
|
|
||||||
|
|||||||
Reference in New Issue
Block a user