mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-07 16:41:55 +00:00
make hexo start at start-up, remove unnecessary config when starting hadoop
This commit is contained in:
parent
738b9498b5
commit
4c95ac5f04
@ -1,8 +1,8 @@
|
||||
# based on sequenceiq/hadoop-docker
|
||||
|
||||
## create a hadoop cluster in swarm mode
|
||||
## Create a hadoop cluster in swarm mode
|
||||
|
||||
`--hostname` need 1.13 or higher
|
||||
`--hostname` needs 1.13 or higher
|
||||
|
||||
```
|
||||
docker service create \
|
||||
@ -10,9 +10,6 @@ docker service create \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-master \
|
||||
--replicas 1 \
|
||||
--mount type=bind,source=/mnt/data/hadoop/hdfs/master,target=/tmp/hadoop-root \
|
||||
--mount type=bind,source=/mnt/data/hadoop/logs/master,target=/usr/local/hadoop/logs \
|
||||
--mount type=bind,source=/mnt/data/hadoop/config,target=/mnt/hadoop-config \
|
||||
--endpoint-mode dnsrr \
|
||||
newnius/hadoop
|
||||
```
|
||||
@ -23,9 +20,6 @@ docker service create \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-slave1 \
|
||||
--replicas 1 \
|
||||
--mount type=bind,source=/mnt/data/hadoop/hdfs/slave1,target=/tmp/hadoop-root \
|
||||
--mount type=bind,source=/mnt/data/hadoop/logs/slave1,target=/usr/local/hadoop/logs \
|
||||
--mount type=bind,source=/mnt/data/hadoop/config,target=/mnt/hadoop-config \
|
||||
--endpoint-mode dnsrr \
|
||||
newnius/hadoop
|
||||
```
|
||||
@ -36,9 +30,6 @@ docker service create \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-slave2 \
|
||||
--replicas 1 \
|
||||
--mount type=bind,source=/mnt/data/hadoop/hdfs/slave2,target=/tmp/hadoop-root \
|
||||
--mount type=bind,source=/mnt/data/hadoop/logs/slave2,target=/usr/local/hadoop/logs \
|
||||
--mount type=bind,source=/mnt/data/hadoop/config,target=/mnt/hadoop-config \
|
||||
--endpoint-mode dnsrr \
|
||||
newnius/hadoop
|
||||
```
|
||||
@ -49,9 +40,6 @@ docker service create \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-slave3 \
|
||||
--replicas 1 \
|
||||
--mount type=bind,source=/mnt/data/hadoop/hdfs/slave3,target=/tmp/hadoop-root \
|
||||
--mount type=bind,source=/mnt/data/hadoop/logs/slave3,target=/usr/local/hadoop/logs \
|
||||
--mount type=bind,source=/mnt/data/hadoop/config,target=/mnt/hadoop-config \
|
||||
--endpoint-mode dnsrr \
|
||||
newnius/hadoop
|
||||
```
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user