From 8635aae65929c8f80eb190db89ffeb28285a16a2 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 22 Sep 2023 12:34:23 +0200 Subject: [PATCH] wip #6269 @0.5 --- Dockerfile | 2 +- config/crontab | 1 + crontab | 1 - docker-compose.yml | 1 + update | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 config/crontab delete mode 100644 crontab diff --git a/Dockerfile b/Dockerfile index 3a9a5aa..7084ff1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,5 +5,5 @@ ENV TERM=linux # Ensure apt doesn't ask questions when installing stuff ENV DEBIAN_FRONTEND=noninteractive -RUN apt update && apt -y --no-install-recommends install rsync ssh +RUN apt update && apt -y --no-install-recommends install rsync ssh cron RUN a2enmod headers \ No newline at end of file diff --git a/config/crontab b/config/crontab new file mode 100644 index 0000000..64d3298 --- /dev/null +++ b/config/crontab @@ -0,0 +1 @@ +* * * * * root /usr/local/bin/sync >/proc/1/fd/1 2>/proc/1/fd/2 \ No newline at end of file diff --git a/crontab b/crontab deleted file mode 100644 index a1bfe46..0000000 --- a/crontab +++ /dev/null @@ -1 +0,0 @@ -* * * * * root docker exec -it fluidbook-hosting-loadbalancer /usr/local/bin/sync >/dev/null 2>/dev/null \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0392625..653305e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - './www/:/var/www/html/' - './config/httpd/apache2.conf:/etc/apache2/apache2.conf' - './bin/sync:/usr/local/bin/sync' + - './config/crontab:/etc/crontab'; restart: unless-stopped build: . env_file: env diff --git a/update b/update index c38b6ec..b8be9ac 100644 --- a/update +++ b/update @@ -10,7 +10,7 @@ git fetch --all git reset --hard origin/master git stash git pull origin master -ln -sf /docker/fluidbook-hosting-loadbalancer/crontab /etc/cron.d/fluidbook-hosting-loadbalancer +rm -f /etc/cron.d/fluidbook-hosting-loadbalancer chmod 755 ./update chmod 755 ./ssh chmod 600 ./ssh/id_rsa -- 2.39.5