add development wallet server deploy script
This commit is contained in:
parent
3713d3488d
commit
f4d3e9ea6a
1 changed files with 20 additions and 0 deletions
20
scripts/deploy_dev_wallet_server.sh
Executable file
20
scripts/deploy_dev_wallet_server.sh
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# usage: update_dev_wallet_server.sh <host to update>
|
||||||
|
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
|
Loading…
Reference in a new issue