|
FROM neosmemo/memos:stable |
|
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 /usr/local/memos && /usr/local/memos/memos ) |