mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-23 23:53:10 +08:00
docker: fix git path, add log
This commit is contained in:
parent
32b91437be
commit
2e172d44cc
@ -2,12 +2,20 @@ FROM alpine:latest
|
||||
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
||||
&& sed -i 'a https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/testing' /etc/apk/repositories \
|
||||
&& apk add agate git
|
||||
&& apk add agate git \
|
||||
&& touch /var/log/git.log
|
||||
|
||||
RUN git clone https://github.com/dongdigua/dongdigua.github.io.git --depth 1
|
||||
|
||||
COPY run-wrapper.sh .
|
||||
# https://weinan.io/2019/04/06/cron.html
|
||||
COPY update-git.sh /etc/periotic/daily/
|
||||
|
||||
# for testing purpose only
|
||||
# RUN mkdir /etc/periodic/1min \
|
||||
# && echo "*/1 * * * * run-parts /etc/periodic/1min" \
|
||||
# >> /var/spool/cron/crontabs/root
|
||||
# COPY update-git.sh /etc/periodic/1min/
|
||||
|
||||
|
||||
CMD [ "./run-wrapper.sh" ]
|
||||
|
@ -1,7 +1,8 @@
|
||||
#! /bin/sh
|
||||
|
||||
crond -f &
|
||||
agate --content dongdigua.github.io/gmi --hostname $GEMINI_HOST
|
||||
crond -f -d 8 &
|
||||
tail -f /var/log/git.log &
|
||||
agate --content dongdigua.github.io/gmi -e --hostname $GEMINI_HOST
|
||||
|
||||
wait -n
|
||||
echo $?
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
|
||||
cd dongdigua.github.io
|
||||
git pull --rebase
|
||||
cd /dongdigua.github.io
|
||||
git pull --rebase >> /var/log/git.log 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user