aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker-compose.yaml1
-rw-r--r--entrypoint.bash4
-rw-r--r--etc/cron.d/1m2
3 files changed, 6 insertions, 1 deletions
diff --git a/docker-compose.yaml b/docker-compose.yaml
index c6e508b..6f9b4a5 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -12,6 +12,7 @@ services:
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-server \
git \
+ cron \
&& rm -rf /var/lib/apt/lists/*
# Create the privilage separation directory as openssh-server post-install script doesn't do it in docker build context
diff --git a/entrypoint.bash b/entrypoint.bash
index f9b6f52..41cc60b 100644
--- a/entrypoint.bash
+++ b/entrypoint.bash
@@ -18,6 +18,10 @@ fi
chown -R git:git /home/git
chown -R git:git /repositories
+# Start the cron service
+echo "Starting cron service..."
+cron
+
# Start the SSH service in the background
echo "Starting SSH service..."
/usr/sbin/sshd -D -E /var/log/sshd.log &
diff --git a/etc/cron.d/1m b/etc/cron.d/1m
index 1dd9b9d..08f094c 100644
--- a/etc/cron.d/1m
+++ b/etc/cron.d/1m
@@ -1 +1 @@
-* * * * * /bin/bash /scripts/gitinfo.bash >> /var/log/gitinfo.log 2>&1 \ No newline at end of file
+* * * * * root /bin/bash /scripts/gitinfo.bash >> /var/log/gitinfo.log 2>&1 \ No newline at end of file