8 Commits

Author SHA1 Message Date
2f914cf8d9 app icon
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-28 16:13:35 +00:00
gyurix
b362f2e37f Filter out SHARED volumes during cleanup in entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-26 13:23:42 +02:00
gyurix
8eb3d1eef1 Filter out USER and SYSTEM volumes during cleanup in entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-26 13:17:32 +02:00
gyurix
2b91706d86 Remove redundant service stop command and add cleanup for environment files in entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-26 12:42:43 +02:00
gyurix
933d182244 Reorder upgrade calls in entrypoint script for framework and web-installer
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-05-21 11:07:50 +02:00
153249211a Update Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-21 09:07:24 +00:00
c5765ca952 Merge branch 'main' of https://git.format.hu/safebox/framework-scheduler
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-15 13:25:48 +00:00
2bcf430dfd upgrade debug 2025-05-15 13:25:02 +00:00
2 changed files with 23 additions and 11 deletions

View File

@@ -20,4 +20,4 @@ COPY scripts/scheduler/*.sh /scripts/
RUN find ./scripts -name "*.sh" | xargs dos2unix
RUN ["chmod", "+x", "-R", "/scripts/"]
ENTRYPOINT ["/scripts/entrypoint.sh"]
CMD /scripts/entrypoint.sh

View File

@@ -208,8 +208,22 @@ remove_additionals() {
fi
done
ENV_FILES=$(cat $SERVICE_DIR/service-$NAME.json | jq -r '[.containers[] | select(has("ENV_FILES")) | .ENV_FILES[]] | unique[]')
for ENV_FILE in $(echo $ENV_FILES); do
if [ -f "$ENV_FILE" ]; then
rm -rf $ENV_FILE
debug "deleted enviroment file: $ENV_FILE"
fi
done
VOLUMES=$(cat $SERVICE_DIR/service-$NAME.json | jq -r '[.containers[] | select(has("VOLUMES")) | .VOLUMES[] | select(.SHARED != "true") | .SOURCE] | unique[]' | grep -vE 'USER|SYSTEM')
for VOLUME in $(echo $VOLUMES); do
# stop service
# force - remove stopped container, docker rm
debug "$service_exec service-$NAME.json stop force dns-remove"
$service_exec service-$NAME.json stop force dns-remove
for VOLUME in $(echo $VOLUMES | grep -vE 'USER|SYSTEM|SHARED'); do
if [ "$(echo $VOLUME | cut -d '/' -f1)" ]; then
docker volume rm $VOLUME
debug "deleted volume: $VOLUME"
@@ -217,11 +231,6 @@ remove_additionals() {
fi
done
# stop service
# force - remove stopped container, docker rm
debug "$service_exec service-$NAME.json stop force dns-remove"
$service_exec service-$NAME.json stop force dns-remove
# remove service files
rm $SERVICE_DIR/*"-"$NAME.json # service, domain, etc.
@@ -607,14 +616,16 @@ upgrade() {
if [ "$NAME" == "web-installer" ]; then
debug "$service_exec service-framework.containers.webserver start info"
debug "$service_exec service-framework.containers.webserver stop force"
$service_exec service-framework.containers.webserver stop force
debug "$service_exec service-framework.containers.webserver start info"
$service_exec service-framework.containers.webserver start info &
else
debug "$service_exec $NAME.json start info"
debug "$service_exec $NAME.json stop force"
$service_exec $NAME.json stop force
debug "$service_exec $NAME.json start info"
$service_exec $NAME.json start info &
fi
PID=$!
@@ -794,12 +805,13 @@ execute_task() {
for APP in $APPS; do
APP_NAME=$(echo "$APP" | jq -r '.name')
APP_VERSION=$(echo "$APP" | jq -r '.version')
APP_ICON=$(echo "$APP" | jq -r '.icon')
if [ "$DEPLOYMENTS" != "" ]; then
SEP=","
else
SEP=""
fi
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": "'$APP_VERSION'"'
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": {"version": "'$APP_VERSION'", "icon": "'$APP_ICON'"}'
done
done
if [ "$DEPLOYMENTS" == "" ]; then
@@ -967,8 +979,8 @@ execute_task() {
JSON="$(echo $B64_JSON | base64 -d)"
NAME=$(echo "$JSON" | jq -r .NAME | awk '{print tolower($0)}')
if [ "$NAME" == "framework" ]; then
upgrade_scheduler
upgrade "web-installer"
upgrade_scheduler
#CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -E 'framework-scheduler|webserver')
else
upgrade "$NAME"