File size: 675 Bytes
6c2f360
635a53c
9dbf4a3
7606975
1305a14
da0f559
927e23c
635a53c
1305a14
31be515
1305a14
31be515
8dbbed1
1
2
3
4
5
6
7
8
9
10
11
12
13
FROM b3log/siyuan
USER root
RUN apk update && apk upgrade && apk add git wget nodejs npm
RUN mkdir -p /home/siyuan && chmod -R u+rwx,g+rwx,o+rwx /home/siyuan
RUN chmod -R u+rwx,g+rwx,o+rwx /tmp
ENV localrepoPath /home/siyuan/SiYuan

USER 1000
ENTRYPOINT export Interval=10000 &&\
    (while true;do git clone https://github.com/edwagbb/GitPipeLocal.git /tmp/gitpipelocal  && break || sleep 5;done) &&\
    cd /tmp/gitpipelocal && npm install &&\
    (while true;do git clone $remoteUrlWithToken $localrepoPath  && break || sleep 5;done) &&\
    (node /tmp/gitpipelocal/index.js & sleep 5 && cd /opt/siyuan && /opt/siyuan/kernel --accessAuthCode $accessAuthCode --lang zh_CN )