|
|
@ -37,7 +37,7 @@ EOF |
|
|
|
# PACKAGES enabled ths with apt-get update && apt-get $APTPARAM install -y openssh-server $PACKAGES in in RUN export DEBIAN_FRONTEND=noninteractive |
|
|
|
APTPARAM=" --no-install-recommends " |
|
|
|
IMAGE_local="microservice-nodejs" |
|
|
|
HYBRID_NETWORK="microservice-nodejs" |
|
|
|
HYBRID_NETWORK="swarmlab-nodejs" |
|
|
|
# dont edit |
|
|
|
IMAGE_origin="hub.swarmlab.io:5443/hybrid-nodevuejs:latest" |
|
|
|
bootstrap="sec_bootstrap" |
|
|
@ -243,7 +243,7 @@ version: "2" |
|
|
|
services: |
|
|
|
|
|
|
|
masterservice: |
|
|
|
image: ${IMAGE_origin} |
|
|
|
image: $IMAGE_NAME |
|
|
|
privileged: true |
|
|
|
environment: |
|
|
|
- NODENAME=${NODENAME} |
|
|
@ -262,7 +262,7 @@ services: |
|
|
|
|
|
|
|
|
|
|
|
workerservice: |
|
|
|
image: ${IMAGE_origin} |
|
|
|
image: $IMAGE_NAME |
|
|
|
privileged: true |
|
|
|
environment: |
|
|
|
- NODENAME=${NODENAME} |
|
|
@ -433,17 +433,11 @@ build_and_push_image () |
|
|
|
{ |
|
|
|
printf "\\n\\n===> BUILD IMAGE" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker build -t \"$REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME\" ." |
|
|
|
echo "$ docker build -t \"$IMAGE_NAME\" ." |
|
|
|
printf "\\n" |
|
|
|
docker build -t "$REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME" . |
|
|
|
#docker build -t "$REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME" . |
|
|
|
docker build -t "$IMAGE_NAME" . |
|
|
|
|
|
|
|
printf "\\n" |
|
|
|
|
|
|
|
printf "\\n\\n===> PUSH IMAGE TO REGISTRY" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker push \"$REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME\"" |
|
|
|
printf "\\n" |
|
|
|
docker push "$REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME" |
|
|
|
} |
|
|
|
|
|
|
|
up_master () |
|
|
@ -627,7 +621,7 @@ if [ $COMMAND_UP -eq 1 ]; then |
|
|
|
clear_all |
|
|
|
#up_registry # remove for microservices |
|
|
|
generate_ssh_keys |
|
|
|
#build_and_push_image # remove for microservices |
|
|
|
build_and_push_image # remove for microservices |
|
|
|
up_master |
|
|
|
up_workers |
|
|
|
|
|
|
@ -659,7 +653,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 |
|
|
|
|
|
|
|