aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker-compose.yaml9
-rw-r--r--etc/cron.d/10m1
-rw-r--r--scripts/mirrors.bash5
3 files changed, 15 insertions, 0 deletions
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 204c145..daa6d62 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -29,6 +29,15 @@ services:
# Copy the entrypoint script into the container
COPY entrypoint.bash /
+ # Copy cron jobs
+ COPY etc/cron.d/* /etc/cron.d/
+
+ # Copy scripts
+ COPY scripts/* /scripts/
+
+ # Set appropriate permissions for the scripts
+ RUN chmod +x /scripts/*
+
# Make the entrypoint script executable
RUN chmod +x /entrypoint.bash
diff --git a/etc/cron.d/10m b/etc/cron.d/10m
new file mode 100644
index 0000000..56b6070
--- /dev/null
+++ b/etc/cron.d/10m
@@ -0,0 +1 @@
+* * * * * /bin/bash /scripts/mirrors.bash >> /var/log/mirrors.log 2>&1 \ No newline at end of file
diff --git a/scripts/mirrors.bash b/scripts/mirrors.bash
new file mode 100644
index 0000000..02c333f
--- /dev/null
+++ b/scripts/mirrors.bash
@@ -0,0 +1,5 @@
+#/bin/bash
+
+# This script is responsible for pushing to mirrors of the git repositories. It runs through all the repositories in the /repositories directory and performs a git push to the corresponding mirror URL(s) defined in the .gitinfo file if they exist.
+
+echo "to be implemented" \ No newline at end of file