]> _ Git - fluidbook-hosting-loadbalancer.git/commitdiff
wip #6269 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 22 Sep 2023 10:34:23 +0000 (12:34 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 22 Sep 2023 10:34:23 +0000 (12:34 +0200)
Dockerfile
config/crontab [new file with mode: 0644]
crontab [deleted file]
docker-compose.yml
update

index 3a9a5aa13944c7375b2cf494b1ce4feabe27c302..7084ff1692099fd6053b09952daf361b8b6e0527 100644 (file)
@@ -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 (file)
index 0000000..64d3298
--- /dev/null
@@ -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 (file)
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
index 039262570a78f2fd8a85ccebc5b2e957db6738d7..653305eb7c768665da9309da7b2e61bd24a64b1b 100644 (file)
@@ -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 c38b6ec2f0a0587fdcd805bbe54e9529bc6dbb46..b8be9ac6bd4b476af049799ed881168f2f54485d 100644 (file)
--- 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