diff options
| author | crupest <crupest@outlook.com> | 2022-11-30 19:07:56 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-11-30 19:07:56 +0800 | 
| commit | 841d6a944613afe89f8db8617373a6fe498486b3 (patch) | |
| tree | 57ac65accf7da8f6986edb40ee01078e528a40ae /docker | |
| parent | 2171f429e7c7511a4603dc41458cc09b11d9c517 (diff) | |
| download | crupest-841d6a944613afe89f8db8617373a6fe498486b3.tar.gz crupest-841d6a944613afe89f8db8617373a6fe498486b3.tar.bz2 crupest-841d6a944613afe89f8db8617373a6fe498486b3.zip  | |
Make hugo generate to another dir out of git.
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/crupest-blog/Dockerfile | 2 | ||||
| -rwxr-xr-x | docker/crupest-blog/update.bash | 4 | 
2 files changed, 4 insertions, 2 deletions
diff --git a/docker/crupest-blog/Dockerfile b/docker/crupest-blog/Dockerfile index e2b27a5..b5dd273 100644 --- a/docker/crupest-blog/Dockerfile +++ b/docker/crupest-blog/Dockerfile @@ -4,6 +4,6 @@ ARG CRUPEST_BLOG_UPDATE_INTERVAL=1d  RUN apk add --no-cache coreutils tini bash git  ENV CRUPEST_BLOG_UPDATE_INTERVAL=${CRUPEST_BLOG_UPDATE_INTERVAL}  COPY daemon.bash update.bash / -VOLUME [ "/blog/public" ] +VOLUME [ "/public" ]  ENTRYPOINT ["/sbin/tini", "--"]  CMD [ "/daemon.bash" ] diff --git a/docker/crupest-blog/update.bash b/docker/crupest-blog/update.bash index f4ac51b..d4bcadc 100755 --- a/docker/crupest-blog/update.bash +++ b/docker/crupest-blog/update.bash @@ -5,6 +5,8 @@ set -e  echo -e "\e[0;103m\e[K\e[1mBegin to build blog...\e[0m"  echo "Begin time: $(date +%Y-%m-%dT%H:%M:%SZ)" +mkdir -p /public +  # check /blog directory exists  if [[ ! -d /blog ]]; then      echo "Directory /blog not found, clone blog repository..." @@ -21,7 +23,7 @@ fi  # Now hugo it  echo "Run hugo to generate blog..." -hugo +hugo -d /public  echo "Finish time: $(date +%Y-%m-%dT%H:%M:%SZ)"  echo -e "\e[0;102m\e[K\e[1mFinish build!\e[0m"  | 
