--- /dev/null
+#!/bin/sh
+
+GIT_ZUE_DEV="/home/git/git.zue.dev/"
+DOCKER_COMPOSE_DIRECTORY="/root/"
+DOCKER_COMPOSE_FILENAME="docker-compose.yaml"
+
+echo "This is a minutely cron job. Current time: $(date)"
+
+# do we have the repo?
+if [ -z "$GIT_ZUE_DEV" ]; then
+ echo "Repository not found. PANIC!"
+ exit 1
+fi
+
+# enter the repo
+cd "$GIT_ZUE_DEV" || { echo "Failed to change directory to $GIT_ZUE_DEV. PANIC!"; exit 1; }
+
+# can we see the docker-compose.yaml file in the repo?
+git cat-file HEAD:"$DOCKER_COMPOSE_FILENAME" > /dev/null 2>&1 || { echo "$DOCKER_COMPOSE_FILENAME not found in the repository. PANIC!"; exit 1; }
+
+# compare our local copy of the docker-compose.yaml with the one in the repo
+if ! git diff --quiet HEAD:"$DOCKER_COMPOSE_FILENAME" "$DOCKER_COMPOSE_DIRECTORY/$DOCKER_COMPOSE_FILENAME"; then
+ echo "$DOCKER_COMPOSE_FILENAME has changed. Updating local copy..."
+ git show HEAD:"$DOCKER_COMPOSE_FILENAME" > "$DOCKER_COMPOSE_DIRECTORY/$DOCKER_COMPOSE_FILENAME"
+
+ # then rebuild the containers
+ echo "Rebuilding Docker containers..."
+ cd "$DOCKER_COMPOSE_DIRECTORY" || { echo "Failed to change directory to $DOCKER_COMPOSE_DIRECTORY. PANIC!"; exit 1; }
+
+ docker compose down
+ docker compose build
+ docker compose up -d
+else
+ echo "$DOCKER_COMPOSE_FILENAME has not changed. No action needed."
+fi
+
+echo "Minutely cron job completed."
\ No newline at end of file