2022-03-22 03:47:11 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# usage: deploy_scribe_dev.sh <host to update>
|
|
|
|
TARGET_HOST=$1
|
|
|
|
|
2022-03-31 17:17:49 +02:00
|
|
|
SCRIPTS_DIR=`dirname $0`
|
2022-03-22 03:47:11 +01:00
|
|
|
|
|
|
|
# build the image
|
2022-05-19 16:35:07 +02:00
|
|
|
docker build -t lbry/hub:development .
|
|
|
|
IMAGE=`docker image inspect lbry/hub:development | sed -n "s/^.*Id\":\s*\"sha256:\s*\(\S*\)\".*$/\1/p"`
|
2022-03-22 03:47:11 +01:00
|
|
|
|
|
|
|
# push the image to the server
|
|
|
|
ssh $TARGET_HOST docker image prune --force
|
|
|
|
docker save $IMAGE | ssh $TARGET_HOST docker load
|
2022-05-19 16:35:07 +02:00
|
|
|
ssh $TARGET_HOST docker tag $IMAGE lbry/hub:development
|
2022-03-22 03:47:11 +01:00
|
|
|
|
|
|
|
## restart the wallet server
|
|
|
|
ssh $TARGET_HOST SCRIBE_TAG="development" docker-compose up -d
|