FROM neosmemo/memos:stable RUN apk update && apk upgrade && apk add git wget nodejs npm RUN chmod -R u+rwx,g+rwx,o+rwx /tmp RUN mkdir -p /.npm && chmod -R u+rwx,g+rwx,o+rwx /.npm ENV localrepoPath /tmp/data 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 && ./memos --data /tmp/data)