Add updateinvidious script
This commit is contained in:
parent
1dfe2888ff
commit
7685b52093
|
@ -0,0 +1,27 @@
|
|||
#!/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
|
||||
git pull -q --rebase
|
||||
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'
|
Loading…
Reference in New Issue