dotfiles/script/updateinvidious

28 lines
620 B
Plaintext
Raw Permalink Normal View History

2021-04-05 08:18:13 +00:00
#!/usr/bin/env bash
#
# Build and push Invidious
#
# TODO: remove Docker hub, push with SSH.
set -e
destdir=$HOME/dev/invidious
image=netfluxio/invidious:latest
remotehost=netflux
if [ ! -d $destdir ]; then
echo "Cloning invidious..."
cd $HOME/dev
git clone -q --depth=1 https://github.com/iv-org/invidious.git invidious
else
echo "Updating invidious..."
cd $destdir
2021-04-19 07:29:13 +00:00
git pull --rebase
2021-04-05 08:18:13 +00:00
fi
cd $destdir
docker build -t $image -f docker/Dockerfile .
docker push $image
ssh $remotehost 'cd dev/netflux-internals && docker-compose pull invidious && docker-compose up -d --force-recreate --no-deps invidious'