diff --git a/scripts/deploy_dev_wallet_server.sh b/scripts/deploy_dev_wallet_server.sh new file mode 100755 index 000000000..5ee6e50f4 --- /dev/null +++ b/scripts/deploy_dev_wallet_server.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# usage: update_dev_wallet_server.sh +TARGET_HOST=$1 + +SCRIPTS_DIR=`dirname $0` +LBRY_DIR=`dirname $SCRIPTS_DIR` + +# build the image +docker build -f $LBRY_DIR/docker/Dockerfile.wallet_server -t lbry/wallet-server:development $LBRY_DIR +IMAGE=`docker image inspect lbry/wallet-server:development | sed -n "s/^.*Id\":\s*\"sha256:\s*\(\S*\)\".*$/\1/p"` + +# push the image to the server +ssh $TARGET_HOST docker image prune --force +docker save $IMAGE | ssh $TARGET_HOST docker load +ssh $TARGET_HOST docker tag $IMAGE lbry/wallet-server:development + +# restart the wallet server +ssh $TARGET_HOST docker-compose down +ssh $TARGET_HOST WALLET_SERVER_TAG="development" docker-compose up -d