addtional chnages

Merge branch 'main' of https://git.format.hu/format/framework-scheduler
This commit is contained in:
gyurix
2024-09-12 14:22:08 +02:00
2 changed files with 12 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ FROM alpine:latest
COPY --from=redis-source /usr/src/redis/src/redis-cli /usr/bin/redis-cli
RUN chmod +x /usr/bin/redis-cli
RUN apk add --update --no-cache docker-cli wget curl dos2unix jq openssl git openssh-client
RUN apk add --update --no-cache docker-cli wget curl dos2unix jq openssl git openssh-client coreutils
COPY scripts/scheduler/*.sh /scripts/
RUN find ./scripts -name "*.sh" | xargs dos2unix

View File

@@ -425,8 +425,15 @@ execute_task() {
else
SEP="";
fi;
SERVICES=$SERVICES$SEP'"'$(cat $SERVICE | jq -r .main.SERVICE_NAME)'": "'$CONTENT'"';
break;
SERVICE_NAME=$(cat $SERVICE | jq -r .main.SERVICE_NAME);
CONTAINER_NAMES=$(cat $SERVICE | jq -r .containers[].NAME);
CONTAINERS="";
for CONTAINER_NAME in "$CONTAINER_NAMES"; do
CONTAINERS="$CONTAINERS "$(docker ps --format '{{.Names}}' | grep -v framework-scheduler | grep $CONTAINER_NAME);
done;
#RESULT=$(echo "$CONTAINERS" | base64 -w0);
SERVICES=$SERVICES$SEP'"'$SERVICE_NAME'": {"content": "'$CONTENT'", "running": "'$CONTAINERS'"}';
fi;
done
@@ -632,6 +639,8 @@ if [ "$VOL" != "1" ]; then
--env WEBSERVER_PORT=$WEBSERVER_PORT \
--network $FRAMEWORK_SCHEDULER_NETWORK \
$DOCKER_REGISTRY_URL/$FRAMEWORK_SCHEDULER_IMAGE:$FRAMEWORK_SCHEDULER_VERSION;
# --entrypoint=sh \
# $DOCKER_REGISTRY_URL/$FRAMEWORK_SCHEDULER_IMAGE:$FRAMEWORK_SCHEDULER_VERSION -c 'sleep 86400';
/usr/bin/docker rm -f $HOSTNAME;
fi;