From b21c915c7275e264a127ac8284f516bd7bfd0650 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Tue, 7 May 2024 12:36:51 -0600 Subject: [PATCH] Moved data to /srv/Repo_Cache --- Dockerfile | 8 ++++---- docker-compose.yml | 2 +- repo_watcher.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7958d49..e78d360 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,11 @@ FROM alpine:latest RUN apk --no-cache add git curl rsync # Add script -COPY repo_watcher.sh /repo_watcher.sh -RUN chmod +x /repo_watcher.sh +COPY repo_watcher.sh /srv/repo_watcher.sh +RUN chmod +x /srv/repo_watcher.sh #Create Directory to store Repositories -RUN mkdir -p /root/Repo_Cache +RUN mkdir -p /srv/Repo_Cache # Start script (Alpine uses /bin/sh instead of /bin/bash) -CMD ["/bin/sh", "-c", "/repo_watcher.sh"] \ No newline at end of file +CMD ["/bin/sh", "-c", "/srv/repo_watcher.sh"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 45662bb..46471ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,5 +8,5 @@ services: image: git.bunny-lab.io/container-registry/git-repo-updater:latest volumes: - /srv/containers:/srv/containers - - /srv/containers/git-repo-updater/Repo_Cache:/root/Repo_Cache + - /srv/containers/git-repo-updater/Repo_Cache:/srv/Repo_Cache restart: always \ No newline at end of file diff --git a/repo_watcher.sh b/repo_watcher.sh index d6c0feb..15e238e 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -6,13 +6,13 @@ process_repo() { DESTINATION=$2 # Ensure The Repo is marked as Safe by Git - git config --global --add safe.directory /root/Repo_Cache/docs + # git config --global --add safe.directory /srv/Repo_Cache/docs # Extract the URL without credentials for logging and notifications CLEAN_REPO_URL=$(echo "$FULL_REPO_URL" | sed 's/https:\/\/[^@]*@/https:\/\//') # Directory to hold the repository locally - REPO_DIR="/root/Repo_Cache/$(basename $CLEAN_REPO_URL .git)" + REPO_DIR="/srv/Repo_Cache/$(basename $CLEAN_REPO_URL .git)" # Clone the repo if it doesn't exist, or navigate to it if it does if [ ! -d "$REPO_DIR" ]; then