From 9109c923dd7318b24e26f1623ecc0ea4b6608ea2 Mon Sep 17 00:00:00 2001 From: Glenn Date: Sun, 27 Apr 2025 20:27:24 +0200 Subject: [PATCH 1/4] fix: add administration page messages and fixes --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 35bd1a2..f127522 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,35 @@ Add this in crontab dokku enter cloud web su -l -s /bin/bash - www-data -c "cd html && php -dmemory_limit=-1 ./occ app:update --all" dokku nginx:set cloud client-max-body-size 500m + + +## Extra configuration steps + +Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead. Without it some important web functionality like "copy to clipboard" or "service workers" will not work! For more details see the documentation ↗. + + 'trusted_proxies' => + array ( + 0 => '172.17.0.1', + ), + + +Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks. For more details see the documentation ↗. + + 'maintenance_window_start' => 1, + +One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations. + + ./occ maintenance:repair --include-expensive + +MariaDB version "11.7.2-MariaDB-ubu2404" detected. MariaDB >=10.6 and <=11.4 is suggested for best performance, stability and functionality with this version of Nextcloud. + + NOOP + +The database is used for transactional file locking. To enhance performance, please configure memcache, if available. For more details see the documentation ↗. + +Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code of the region to your config file. For more details see the documentation ↗. + +You have not set or verified your email server configuration, yet. Please head over to the "Basic settings" in order to set them. Afterwards, use the "Send email" button below the form to verify your settings. For more details see the documentation ↗. + +* disable dashboad + From 457572b365d15d81db0cdf901b9cc102a1dc5e5d Mon Sep 17 00:00:00 2001 From: Glenn Date: Fri, 16 May 2025 16:46:25 +0200 Subject: [PATCH 2/4] refactor: split supervisord configuration --- Dockerfile | 1 + supervisor.conf.d/apache2.conf | 8 ++++++++ supervisor.conf.d/cron.conf | 8 ++++++++ supervisord.conf | 13 ------------- 4 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 supervisor.conf.d/apache2.conf create mode 100644 supervisor.conf.d/cron.conf diff --git a/Dockerfile b/Dockerfile index 4d7df5e..1253f1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -108,6 +108,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ supervisor \ && rm -rf /var/lib/apt/lists/* \ && mkdir /var/log/supervisord /var/run/supervisord +COPY supervisor.conf.d/* /etc/supervisor/conf.d/ COPY supervisord.conf /etc/supervisord.conf # COPY --chmod=755 ./hooks/gx.post-installation.www.sh /app/gx.post-installation.www.sh diff --git a/supervisor.conf.d/apache2.conf b/supervisor.conf.d/apache2.conf new file mode 100644 index 0000000..3f1b891 --- /dev/null +++ b/supervisor.conf.d/apache2.conf @@ -0,0 +1,8 @@ +[program:apache2] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apache2-foreground + + diff --git a/supervisor.conf.d/cron.conf b/supervisor.conf.d/cron.conf new file mode 100644 index 0000000..529bc3c --- /dev/null +++ b/supervisor.conf.d/cron.conf @@ -0,0 +1,8 @@ + + +[program:cron] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=/cron.sh diff --git a/supervisord.conf b/supervisord.conf index 836a08a..9849c5b 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -7,16 +7,3 @@ logfile_maxbytes=50MB ; maximum size of logfile before logfile_backups=10 ; number of backed up logfiles loglevel=error -[program:apache2] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -command=apache2-foreground - -[program:cron] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -command=/cron.sh From 0514de5f4ab8091ffb83be07ca295bca11122209 Mon Sep 17 00:00:00 2001 From: Glenn Date: Fri, 16 May 2025 16:46:39 +0200 Subject: [PATCH 3/4] feat: add supervisor program for background worker --- supervisor.conf.d/background-worker.conf | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 supervisor.conf.d/background-worker.conf diff --git a/supervisor.conf.d/background-worker.conf b/supervisor.conf.d/background-worker.conf new file mode 100644 index 0000000..396c261 --- /dev/null +++ b/supervisor.conf.d/background-worker.conf @@ -0,0 +1,30 @@ +[program:nextcloud-background-worker] +; Root directory of your Nextcloud instance +directory=/var/www/nextcloud + +; Exact command to run +command=/usr/bin/local/php occ background-job:worker -v -t 60 "OC\\TaskProcessing\\SynchronousBackgroundJob" + +; Run directly as the www-data user +user=www-data + +; Automatic start and restart +autostart=true ; start as soon as supervisord starts +autorestart=true ; always restart +startsecs=10 ; 10 seconds after supervisord starts +startretries=3 ; 3 attempts before considering it “failed” + +; Proper signal handling (useful if the worker spawns children) +stopasgroup=true +killasgroup=true + +; Dedicated logs for easier troubleshooting +; stdout_logfile=/var/log/supervisor/nextcloud-worker.out.log +; stderr_logfile=/var/log/supervisor/nextcloud-worker.err.log +; stdout_logfile_maxbytes=5MB +; stderr_logfile_maxbytes=5MB +; stdout_logfile_backups=3 +; stderr_logfile_backups=3 + +; (optional) Additional environment variables +; environment=PATH="/usr/local/bin:/usr/bin:/bin" From 430a3a552d8de86573511e8b04d104d1387b7bc0 Mon Sep 17 00:00:00 2001 From: Glenn Date: Fri, 16 May 2025 16:49:33 +0200 Subject: [PATCH 4/4] fix: start multiple processes --- supervisor.conf.d/background-worker.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supervisor.conf.d/background-worker.conf b/supervisor.conf.d/background-worker.conf index 396c261..0f38d7f 100644 --- a/supervisor.conf.d/background-worker.conf +++ b/supervisor.conf.d/background-worker.conf @@ -18,6 +18,9 @@ startretries=3 ; 3 attempts before considering it “failed” stopasgroup=true killasgroup=true +; Start multiple instances +numprocs=3 + ; Dedicated logs for easier troubleshooting ; stdout_logfile=/var/log/supervisor/nextcloud-worker.out.log ; stderr_logfile=/var/log/supervisor/nextcloud-worker.err.log