add cron job configutation

documentation about preview files generation
This commit is contained in:
2025-07-21 00:05:15 +00:00
parent 2982e9614f
commit c492269972
3 changed files with 45 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ Using [NextCloud](https://nextcloud.com/)
- [command](#command) - [command](#command)
- [maintenance mode](#maintenance-mode) - [maintenance mode](#maintenance-mode)
- [scan files](#scan-files) - [scan files](#scan-files)
- [preview generator](#preview-generator)
- [repair tree](#repair-tree) - [repair tree](#repair-tree)
- [delete file locks](#delete-file-locks) - [delete file locks](#delete-file-locks)
- [Setup](#setup) - [Setup](#setup)
@@ -14,7 +15,6 @@ Using [NextCloud](https://nextcloud.com/)
- [Add helm chart](#add-helm-chart) - [Add helm chart](#add-helm-chart)
- [Update Helm chart](#update-helm-chart) - [Update Helm chart](#update-helm-chart)
- [Install / Update](#install--update) - [Install / Update](#install--update)
- [backups](#backups)
## command ## command
@@ -29,6 +29,21 @@ su -s /bin/bash www-data -c "php -d memory_limit=-1 /var/www/html/occ maintenanc
``` bash ``` bash
su -s /bin/bash www-data -c "php -d memory_limit=-1 /var/www/html/occ files:scan --all" su -s /bin/bash www-data -c "php -d memory_limit=-1 /var/www/html/occ files:scan --all"
```
### preview generator
<https://apps.nextcloud.com/apps/previewgenerator>
``` bash
su -s /bin/bash www-data -c "./occ preview:generate-all -vvv"
su -s /bin/bash www-data -c "./occ preview:generate-all --path=marcio.fernandes/files/Photos -vvv"
```
``` bash
# cron job
php /var/www/nextcloud/occ preview:pre-generate
``` ```
### repair tree ### repair tree

View File

@@ -53,6 +53,34 @@ resources:
cpu: "0.5" cpu: "0.5"
memory: 512Mi memory: 512Mi
## Cronjob to execute Nextcloud background tasks
## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#cron
##
cronjob:
enabled: true
## Cronjob sidecar resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}
# Allow configuration of lifecycle hooks
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
lifecycle: {}
# postStartCommand: []
# preStopCommand: []
# Set securityContext parameters. For example, you may need to define runAsNonRoot directive
securityContext: {}
# runAsUser: 33
# runAsGroup: 33
# runAsNonRoot: true
# readOnlyRootFilesystem: true
# The command the cronjob container executes.
command:
- /cron.sh
nextcloud: nextcloud:
extraVolumes: extraVolumes:
- name: mf-documents - name: mf-documents

View File

@@ -7,7 +7,7 @@ metadata:
namespace: cloud-limbosolutions-com namespace: cloud-limbosolutions-com
spec: spec:
storageClassName: "" # isto tem mesmo de ficar senão não funciona não sei pq.. tem de ficar "" storageClassName: "" # isto tem mesmo de ficar senão não funciona não sei pq.. tem de ficar ""
volumeName: mf-documents-storage-limbosolutions-co volumeName: mf-documents-storage-limbosolutions-com
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
resources: resources: