move deploy_scribe_dev.sh to scripts
-add docker/hooks
This commit is contained in:
parent
eea5bb5384
commit
6206589d98
2 changed files with 10 additions and 3 deletions
7
docker/hooks/build
Normal file
7
docker/hooks/build
Normal 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 .
|
|
@ -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
|
Loading…
Reference in a new issue