|
|
@ -183,14 +183,9 @@ if [ "$Wdir" == "$HOME" ]; then |
|
|
|
echo "##### Create project #####" |
|
|
|
echo "# -----------------------------------------------" |
|
|
|
|
|
|
|
# clean old images |
|
|
|
#docker rmi $(docker images -f "dangling=true" -q) |
|
|
|
|
|
|
|
rm -f $Wdir/out.log 2> /dev/null |
|
|
|
|
|
|
|
error="Error:"; |
|
|
|
IMAGE=$(docker inspect --type=image $REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME:latest 2>&1 | tee $Wdir/out.log) |
|
|
|
if search=$(grep "$error" $Wdir/out.log) |
|
|
|
search='ok' |
|
|
|
if [ $search == 'ok' ] |
|
|
|
then |
|
|
|
echo ">>> Load Origin " |
|
|
|
cat << EOF > $Wdir/Dockerfile |
|
|
@ -246,13 +241,9 @@ cat << EOF > $Wdir/docker-compose.yml |
|
|
|
version: "2" |
|
|
|
|
|
|
|
services: |
|
|
|
# registry: |
|
|
|
# image: registry |
|
|
|
# ports: |
|
|
|
# - "${REGISTRY_PORT}:5000" |
|
|
|
|
|
|
|
masterservice: |
|
|
|
image: $REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME |
|
|
|
image: ${IMAGE_origin} |
|
|
|
privileged: true |
|
|
|
environment: |
|
|
|
- NODENAME=${NODENAME} |
|
|
@ -271,7 +262,7 @@ services: |
|
|
|
|
|
|
|
|
|
|
|
workerservice: |
|
|
|
image: $REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME |
|
|
|
image: ${IMAGE_origin} |
|
|
|
privileged: true |
|
|
|
environment: |
|
|
|
- NODENAME=${NODENAME} |
|
|
@ -668,7 +659,7 @@ elif [ $COMMAND_RELOAD -eq 1 ]; then |
|
|
|
create_dockerfile |
|
|
|
down_master |
|
|
|
down_workers |
|
|
|
build_and_push_image |
|
|
|
#build_and_push_image |
|
|
|
up_master |
|
|
|
up_workers |
|
|
|
|
|
|
|