From d1e7e7b74a562f2f180ad0fd2631f908ce92261e Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 1 Apr 2021 20:34:41 +0300 Subject: [PATCH] add microservice --- install/usr/share/swarmlab.io/sec/swarmlab-sec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index bab8ae3..b10455c 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -43,7 +43,8 @@ IMAGE_origin="hub.swarmlab.io:5443/hybrid-nodevuejs:latest" bootstrap="sec_bootstrap" hostnames="auto_update_hosts" hostnames_get="get_hosts" -NODENAME=${HYBRID_NETWORK}_master_1.${HYBRID_NETWORK}_${HYBRID_NETWORK} +#NODENAME=${HYBRID_NETWORK}_masterservice_1.${HYBRID_NETWORK}_${HYBRID_NETWORK} +NODENAME=${IMAGE_local}_masterservice_1.${IMAGE_local}_${HYBRID_NETWORK} NODENETWORK=${HYBRID_NETWORK} # shellcheck disable=SC1091 #. ./.env @@ -380,12 +381,13 @@ SwarmLab.io" clear_all () { - $(docker stop $(docker ps -a | grep "_masterservice_" | awk '{print $1}')) || true - $(docker stop $(docker ps -a | grep "_workerservice_" | awk '{print $1}')) || true + $(docker stop $(docker ps -a | grep "${IMAGE_local}_masterservice_" | awk '{print $1}')) || true + $(docker stop $(docker ps -a | grep "${IMAGE_local}_workerservice_" | awk '{print $1}')) || true + #$(docker stop $(docker ps -a | grep "_registry_" | awk '{print $1}')) || true # remove for microservices #docker ps -a | grep "_registry_" | awk '{print $1}' | xargs docker container rm || true # remove for microservices - docker ps -a | grep "_workerservice_" | awk '{print $1}' | xargs docker container rm || true - docker ps -a | grep "_masterservice_" | awk '{print $1}' | xargs docker container rm || true + docker ps -a | grep "${IMAGE_local}_workerservice_" | awk '{print $1}' | xargs docker container rm || true + docker ps -a | grep "${IMAGE_local}_masterservice_" | awk '{print $1}' | xargs docker container rm || true } down_all ()