make hexo start at start-up, remove unnecessary config when starting hadoop

This commit is contained in:
newnius
2017-03-30 17:08:10 +08:00
parent 738b9498b5
commit 4c95ac5f04
4 changed files with 13 additions and 19 deletions

View File

@@ -18,4 +18,4 @@ ADD bootstrap.sh /etc/bootstrap.sh
WORKDIR /blog
CMD ["bash", "/etc/bootstrap.sh", "nothing"]
ENTRYPOINT ["/etc/bootstrap.sh"]

View File

@@ -2,14 +2,20 @@ https://hexo.io/zh-cn/
http://theme-next.iissnan.com/
First Time:
First Time(not inited):
docker service create \
--name hexo \
--publish 4000:4000 \
--publish 80: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
docker service create \
--name hexo \
--publish 80:4000 \
-e GIT_EMAIL="me@newnius.com" \
-e GIT_NAME="newnius" \
--mount type=bind,source=/mnt/data/blog,target=/blog \
newnius/hexo server

View File

@@ -3,7 +3,7 @@
git config --global user.email $GIT_EMAIL
git config --global user.name $GIT_NAME
if [ "$1" == "server" ]; then
if [ "$1" = "server" ]; then
# start hexo server
echo "starting hexo..."
hexo server