move deploy_scribe_dev.sh to scripts

-add docker/hooks
This commit is contained in:
Jack Robison 2022-03-31 11:17:49 -04:00
parent eea5bb5384
commit 6206589d98
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 10 additions and 3 deletions

7
docker/hooks/build Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR/../.." ## make sure we're in the right place. Docker Hub screws this up sometimes
echo "docker build dir: $(pwd)"
docker build --build-arg DOCKER_TAG=$DOCKER_TAG --build-arg DOCKER_COMMIT=$SOURCE_COMMIT -f $DOCKERFILE_PATH -t $IMAGE_NAME .

View file

@ -3,11 +3,11 @@
# usage: deploy_scribe_dev.sh <host to update> # usage: deploy_scribe_dev.sh <host to update>
TARGET_HOST=$1 TARGET_HOST=$1
DOCKER_DIR=`dirname $0` SCRIPTS_DIR=`dirname $0`
SCRIBE_DIR=`dirname $DOCKER_DIR` SCRIBE_DIR=`dirname $SCRIPTS_DIR`
# build the image # build the image
docker build -f $DOCKER_DIR/Dockerfile -t lbry/scribe:development $SCRIBE_DIR docker build -f $SCRIBE_DIR/docker/Dockerfile -t lbry/scribe:development $SCRIBE_DIR
IMAGE=`docker image inspect lbry/scribe:development | sed -n "s/^.*Id\":\s*\"sha256:\s*\(\S*\)\".*$/\1/p"` IMAGE=`docker image inspect lbry/scribe:development | sed -n "s/^.*Id\":\s*\"sha256:\s*\(\S*\)\".*$/\1/p"`
# push the image to the server # push the image to the server