Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextcloud: fix cron #671

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ix-dev/stable/nextcloud/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ sources:
- https://github.com/truenas/charts/tree/master/charts/nextcloud
title: Nextcloud
train: stable
version: 1.3.20
version: 1.3.21
4 changes: 3 additions & 1 deletion ix-dev/stable/nextcloud/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ services:
{% endif %}
volumes: {{ volume_mounts.items | tojson }}

{% if values.nextcloud.cron.enabled %}
{# See later if we want allow running custom commands on cron. #}
{{ values.consts.cron_container_name }}:
user: "0:0"
Expand All @@ -316,7 +317,7 @@ services:
- -c
command:
- |
echo "{{ values.nextcloud.schedule }} php -f /var/www/html/cron.php" > /var/spool/cron/crontabs/www-data || { echo "Failed to create crontab"; exit 1; }
echo "{{ values.nextcloud.cron.schedule }} php -f /var/www/html/cron.php" > /var/spool/cron/crontabs/www-data || { echo "Failed to create crontab"; exit 1; }
/cron.sh || { echo "Failed to run cron"; exit 1; }
configs:
- source: occ
Expand All @@ -341,6 +342,7 @@ services:
{% set cron_test = "pidof busybox > /dev/null" %}
healthcheck: {{ ix_lib.base.healthchecks.check_health(cron_test) | tojson }}
volumes: {{ volume_mounts.items | tojson }}
{% endif %}

{% set resource_without_gpus = ix_lib.base.utils.copy_dict(values.resources) %}
{% do resource_without_gpus.pop("gpus", None) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ nextcloud:
php_memory_limit: 512
op_cache_memory_consumption: 128
max_execution_time: 30
schedule: "*/5 * * * *"
cron:
enabled: true
schedule: "*/5 * * * *"
additional_envs: []
network:
web_port: 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ nextcloud:
php_memory_limit: 512
op_cache_memory_consumption: 128
max_execution_time: 30
schedule: "*/5 * * * *"
cron:
enabled: true
schedule: "*/5 * * * *"
additional_envs: []
network:
web_port: 8080
Expand Down
50 changes: 50 additions & 0 deletions ix-dev/stable/nextcloud/templates/test_values/no-cron-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
resources:
limits:
cpus: 2.0
memory: 4096

nextcloud:
admin_user: admin
admin_password: password
apt_packages:
- ffmpeg
- smbclient
- ocrmypdf
tesseract_languages:
- eng
- chi-sim
host: localhost:8080
data_dir_path: /var/www/html/data
redis_password: password
db_user: nextcloud
db_password: password
php_upload_limit: 3
php_memory_limit: 512
op_cache_memory_consumption: 128
max_execution_time: 30
cron:
enabled: true
schedule: "*/5 * * * *"
additional_envs: []
network:
web_port: 8080
certificate_id:
nginx:
proxy_timeout: 60
use_different_access_port: false

storage:
is_data_in_the_same_volume: false
data:
type: volume
auto_permissions: true
volume_name: nextcloud-data
html:
type: volume
auto_permissions: true
volume_name: nextcloud-html
postgres_data:
type: volume
auto_permissions: true
volume_name: nextcloud-postgres-data
additional_storage: []
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ nextcloud:
php_memory_limit: 512
op_cache_memory_consumption: 128
max_execution_time: 30
schedule: "*/5 * * * *"
cron:
enabled: true
schedule: "*/5 * * * *"
additional_envs: []
network:
web_port: 8080
Expand Down
Loading