]> _ Git - psq.git/commitdiff
try #7454 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 24 Apr 2025 13:16:07 +0000 (15:16 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 24 Apr 2025 13:16:07 +0000 (15:16 +0200)
.docker/config/cron/crontab [deleted file]
.docker/config/cron/root [new file with mode: 0644]
.docker/config/cron/user [new file with mode: 0644]
.docker/images/php-fpm/Dockerfile
.docker/images/php-fpm/startup
.docker/production/docker-compose.yml
.docker/production/update
app/Console/Kernel.php

diff --git a/.docker/config/cron/crontab b/.docker/config/cron/crontab
deleted file mode 100644 (file)
index f9216e0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-* * * * *   runuser -l presquot -c '/usr/bin/php /application/artisan schedule:run' > /proc/1/fd/1 2>/proc/1/fd/2
diff --git a/.docker/config/cron/root b/.docker/config/cron/root
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/.docker/config/cron/user b/.docker/config/cron/user
new file mode 100644 (file)
index 0000000..7c1a197
--- /dev/null
@@ -0,0 +1 @@
+* * * * *   /usr/bin/php /application/artisan schedule:run
index 1d9b81dcef1f97e5a633794892e3e68fe5e0d4f0..a525f99d7a9e2d9cce7ecbc8f2677f18e4c91fb8 100644 (file)
@@ -51,7 +51,7 @@ RUN apt -y --no-install-recommends install \
         php8.3-fpm \
         less nano wget nodejs
 
-RUN apt -y --no-install-recommends install nodejs sudo openssh-server rsyslog cron mariadb-client zip unzip imagemagick
+RUN apt -y --no-install-recommends install nodejs sudo openssh-server rsyslog cron postfix mariadb-client zip unzip imagemagick
 RUN apt update
 RUN apt -y --no-install-recommends install python3 make g++ build-essential
 
index a197718a3fee8a859675317bacdc2ccc9f5d2a24..925e2d412c25f4406d1c4b7eae894b3fae2522fd 100644 (file)
@@ -24,7 +24,7 @@ chmod 600 /root/.ssh/authorized_keys2
 /usr/sbin/service ssh start
 
 # Cron
-chmod 0644 /etc/crontab && crontab -u root /etc/crontab && /usr/sbin/service cron start
+chmod 0644 /etc/crontab && crontab -u root /etc/crontab && chmod 644 /etc/crontab-user && crontab -u presquot /etc/crontab-user && /usr/sbin/service cron start
 
 # Set user password
 chpasswd < /root/passwords
index ae658178d537c412fd072ab147ec8b4f8b508e0e..4a22def8db92df49fd9bd73f59330564c40ce31b 100644 (file)
@@ -47,7 +47,8 @@ services:
       # Rclone
       - './www/.docker/config/rclone:/application/.config/rclone'
       # Cron
-      - './www/.docker/config/cron/crontab:/etc/crontab'
+      - './www/.docker/config/cron/root:/etc/crontab'
+      - './www/.docker/config/cron/user:/etc/crontab-user'
       # PHP
       - './www/.docker/config/php.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini'
       # ENV
index c10b7e1cd3dd1377e6e4bff9a67804780b889abf..9000ad3183019588a72be9b90463412dcb4770d1 100644 (file)
@@ -2,7 +2,8 @@
 cd /docker/presquot
 docker network create presquot
 
-chown 0:0 ./www/.docker/config/cron/crontab
+chown 1001:33 ./www/.docker/config/cron/user
+chown 0:0 ./www/.docker/config/cron/root
 chown 0:0 ./www/.docker/config/sudoers
 chown -R 999:999 ./database/data
 chown -R 999:999 ./redis
index 40a07b9a788454b183e7b21c8c4df3e1b754ee7f..799f4209c28e05a9c17c50b2b334d094baa2b875 100644 (file)
@@ -26,7 +26,11 @@ class Kernel extends ConsoleKernel
     protected function schedule(Schedule $schedule)
     {
         $schedule->job(new CheckForTrialExpirationDates)->dailyAt('13:00');
-        $schedule->command('psq:fluidbook:archives')->everyFifteenMinutes();
+        $schedule->command('psq:fluidbook:archives')->everyThirtyMinutes();
+        $schedule->call(function(){
+            echo 'test ping !';
+            return 'test ping !';
+        })->everyMinute();
     }
 
     /**