mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-12-13 01:36:43 +00:00
make hexo start at start-up, remove unnecessary config when starting hadoop
This commit is contained in:
@@ -18,4 +18,4 @@ ADD bootstrap.sh /etc/bootstrap.sh
|
||||
|
||||
WORKDIR /blog
|
||||
|
||||
CMD ["bash", "/etc/bootstrap.sh", "nothing"]
|
||||
ENTRYPOINT ["/etc/bootstrap.sh"]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user