Add storage keepalive (upholds) across services, Nextcloud cron, disable Nextcloud PHP JIT
Requires= doesn't restart a service once its required mount comes back after a USB disconnect/remount, so a dedicated storage-keepalive unit now Upholds= every storage-dependent service to bring it back automatically. Also adds the missing Nextcloud cron.php timer (background jobs were never triggered), and disables opcache.jit in the Nextcloud container — PHP 8.4's JIT was miscompiling OC\Config\UserConfig::getValueBool(), crashing every session-bootstrapping request with a bogus strtolower() TypeError. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,19 @@ let
|
||||
MaxConnectionsPerChild 500
|
||||
</IfModule>
|
||||
'';
|
||||
|
||||
# PHP 8.4's JIT miscompiles OC\Config\UserConfig::getValueBool() on this
|
||||
# image, corrupting the type of the value passed to strtolower() and
|
||||
# throwing "Argument #1 ($string) must be of type string, string given"
|
||||
# on every request that bootstraps a user session (confirmed by disabling
|
||||
# JIT live on 2026-10-08: the crash stopped immediately). Not an app or
|
||||
# data bug — getTypedValue()'s `: string` return type and
|
||||
# decryptSensitiveValue()'s `string &$value` by-ref param both independently
|
||||
# guarantee the value is already a real string under strict_types=1 by the
|
||||
# time strtolower() rejects it.
|
||||
phpDisableJitConfig = pkgs.writeText "zzz-disable-jit.ini" ''
|
||||
opcache.jit=0
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.homey.nextcloud = {
|
||||
@@ -158,6 +171,8 @@ in
|
||||
"${nextcloudCustomConfig}:/var/www/html/config/zakobar.config.php:ro"
|
||||
# Apache MPM limits (caps concurrent PHP processes / disk writers)
|
||||
"${apacheMpmConfig}:/etc/apache2/mods-available/mpm_prefork.conf:ro"
|
||||
# Disable JIT — see phpDisableJitConfig comment above for why.
|
||||
"${phpDisableJitConfig}:/usr/local/etc/php/conf.d/zzz-disable-jit.ini:ro"
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
@@ -210,6 +225,8 @@ in
|
||||
# UID 33 = www-data in the Nextcloud container
|
||||
# UID 999 = postgres — must own the db dir (creates files directly in it)
|
||||
# -----------------------------------------------------------------------
|
||||
homey.storage.upholds = [ "podman-nextcloud-postgres.service" "podman-nextcloud.service" ];
|
||||
|
||||
homey.storage.extraDirs = [
|
||||
{ path = "nextcloud"; }
|
||||
{ path = "nextcloud/html"; user = "33"; group = "33"; }
|
||||
|
||||
Reference in New Issue
Block a user