|
FROM node:16-alpine |
|
ENV PORT 7860 |
|
RUN apk update && apk upgrade && apk add git wget |
|
RUN chmod -R u+rwx,g+rwx,o+rwx /tmp |
|
ENV localrepoPath /tmp/okok |
|
|
|
COPY <<EOF /start.sh |
|
while true; do |
|
export Interval=10000 &&\ |
|
git clone https://github.com/edwagbb/GitPipeLocal.git /tmp/gitpipelocal &&\ |
|
ls /tmp/gitpipelocal &&\ |
|
cd /tmp/gitpipelocal && npm install &&\ |
|
git clone $remoteUrlWithToken $localrepoPath &&\ |
|
cd $localrepoPath &&\ |
|
npm install &&\ |
|
export func_dir=$localrepoPath/functions &&\ |
|
export static_dir=$localrepoPath/static &&\ |
|
(node index.js & node /tmp/gitpipelocal/index.js) |
|
done |
|
EOF |
|
RUN chmod -R u+rwx,g+rwx,o+rwx /start.sh |
|
|
|
CMD /start.sh |