You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
754 B
Bash

#!/bin/sh
4 years ago
# import trusted fingerprints
mkdir "$HOME/.ssh"
echo "$SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
# use a custom ssh key for git
export GIT_SSH_COMMAND="ssh -i ""$SSH_PRIVATE_KEY"""
docker pull gitea.lubiland.de/lubiland/swarm-nat
4 years ago
while :; do
# check if the git repository already got cloned
if [ -d .git ]; then
# update the git repository
git pull
else
# no repository found; do an initial clone
git clone "$REPOSITORY" .
fi
# run the actual swarm-nat docker container
docker run --rm --net=host --cap-add=NET_ADMIN --volume /var/run/docker.sock:/var/run/docker.sock --volume /cephfs/lubiland-lubinat/lubidock/stacks:/stacks gitea.lubiland.de/lubiland/swarm-nat
4 years ago
sleep 60
done