From f4d3e9ea6a5ba48d467187fbb25d6f06527d377e Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 13 Feb 2020 13:54:46 -0500 Subject: [PATCH] add development wallet server deploy script --- scripts/deploy_dev_wallet_server.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/deploy_dev_wallet_server.sh 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