make repository url an runtime env var

master
Dirk Heilig 2024-09-26 11:21:07 +02:00
parent 77ec05a43c
commit 6a5fde94c2
2 changed files with 9 additions and 1 deletions

View File

@ -17,5 +17,4 @@ ADD starter /usr/local/bin/
EXPOSE 80
WORKDIR /repo
RUN git clone "$GIT_URL" .
CMD /usr/local/bin/starter

View File

@ -25,8 +25,17 @@ function update() {
rm -rf /var/www/html-delme &
git reset --hard
}
function init() {
test -z "$GIT_URL" && {
echo "GIT_URL is not set"
exit 1
}
git clone "$GIT_URL" .
}
cd /repo
init
update
(
while true; do