This commit is contained in:
newnius 2016-12-01 11:51:10 +08:00
parent 77aca1ab5a
commit daf3d740ff
3 changed files with 14 additions and 2 deletions

View File

@ -9,7 +9,10 @@ RUN npm install hexo-generator-feed --save
#Local Search
RUN npm install hexo-generator-searchdb --save
RUN npm install --save hexo-algolia
RUN npm install --save hexo-algolia@0.2.0
RUN npm install hexo-deployer-git --save
ADD bootstrap.sh /etc/bootstrap.sh

View File

@ -3,7 +3,13 @@ https://hexo.io/zh-cn/
http://theme-next.iissnan.com/
First Time:
docker service create --name hexo --publish 4000:4000 --mount type=bind,source=/mnt/data/blog,target=/blog newnius/hexo
docker service create \
--name hexo \
--publish 4000:4000 \
-e GIT_EMAIL="me@newnius.com" \
-e GIT_NAME="newnius" \
--mount type=bind,source=/mnt/data/blog,target=/blog \
newnius/hexo
Start Server:
docker service create --name hexo --publish 4000:4000 --mount type=bind,source=/mnt/data/blog,target=/blog newnius/hexo /etc/bootstrap.sh server

View File

@ -1,5 +1,8 @@
#! /bin/bash
git config --global user.email $GIT_EMAIL
git config --global user.name $GIT_NAME
if [ "$1" == "server" ]; then
# start hexo server
echo "starting hexo..."