mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-27 21:30:53 +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 \
|
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 \
|
&& 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
|
RUN git clone https://github.com/dongdigua/dongdigua.github.io.git --depth 1
|
||||||
|
|
||||||
COPY run-wrapper.sh .
|
COPY run-wrapper.sh .
|
||||||
|
# https://weinan.io/2019/04/06/cron.html
|
||||||
COPY update-git.sh /etc/periotic/daily/
|
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" ]
|
CMD [ "./run-wrapper.sh" ]
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
crond -f &
|
crond -f -d 8 &
|
||||||
agate --content dongdigua.github.io/gmi --hostname $GEMINI_HOST
|
tail -f /var/log/git.log &
|
||||||
|
agate --content dongdigua.github.io/gmi -e --hostname $GEMINI_HOST
|
||||||
|
|
||||||
wait -n
|
wait -n
|
||||||
echo $?
|
echo $?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
cd dongdigua.github.io
|
cd /dongdigua.github.io
|
||||||
git pull --rebase
|
git pull --rebase >> /var/log/git.log 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user