From 978591e286a0341a8fe6faaf9ff6288f66b148c4 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 13 Jun 2024 14:27:03 +0000 Subject: [PATCH] Upload New File --- cron.php.Cronjob.yaml.save | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 cron.php.Cronjob.yaml.save diff --git a/cron.php.Cronjob.yaml.save b/cron.php.Cronjob.yaml.save new file mode 100644 index 0000000..32e8280 --- /dev/null +++ b/cron.php.Cronjob.yaml.save @@ -0,0 +1,42 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-php + namespace: nextcloud +spec: + schedule: 2 * * * * + jobTemplate: + spec: + ttlSecondsAfterFinished: 100 + template: + spec: + containers: + - name: nextcloud-webserver-cron + image: nextcloud:28.0.6-apache + #command: "su -s /bin/sh www-data php cron.php" + command: [ "su", "-s", "/bin/sh","www-data" ] + args: + - php cron.php + imagePullPolicy: Always + ports: + - containerPort: 80 + name: webserver-port + env: + - name: POSTGRES_HOST + value: "db" + volumeMounts: + - name: nextcloud-webserver + mountPath: /var/www/html + securityContext: + fsGroup: 33 + + restartPolicy: OnFailure + volumes: + - name: nextcloud-cron-job-php-log + hostPath: + path: /var/log/cron_job_php.log + type: File + + - name: nextcloud-webserver + persistentVolumeClaim: + claimName: nextcloud-webserver