diff --git a/oci/catalog/apps/nextcloud-mariadb.json b/oci/catalog/apps/nextcloud-mariadb.json index 800d6823..abbed7a4 100644 --- a/oci/catalog/apps/nextcloud-mariadb.json +++ b/oci/catalog/apps/nextcloud-mariadb.json @@ -48,7 +48,7 @@ "revision": "bde257b20aa3ea653bf6900d22356c15cede5cc8", "image_repository_url": "https://github.com/linuxserver/docker-nextcloud/pkgs/container/nextcloud", "readme_pushed_at": "", - "compose_sha256": "f68fd416080b89759c26e3d1c805c431ab3158048ed83fbdd6aabb4f166c78d0", + "compose_sha256": "84937d6f7b501808b46dda6a68c3e517ac589a38d0afc2728c050535738a3fcf", "generated_at": "2026-11-03T22:32:36+00:00" }, "container_contract": { @@ -167,7 +167,7 @@ ], "restart": "unless-stopped", "stop_grace_period": null, - "original_compose": "name: nextcloud\nservices:\n db:\n environment:\n MYSQL_DATABASE: nextcloud\n MYSQL_PASSWORD: ${GENERATED_DB_PASSWORD}\n MYSQL_ROOT_PASSWORD: ${GENERATED_DB_ROOT_PASSWORD}\n MYSQL_USER: nextcloud\n TZ: ${TZ}\n image: mariadb:10.11\n restart: unless-stopped\n volumes:\n - read_only: false\n source: database\n target: /var/lib/mysql\n mem_limit: 1g\n healthcheck:\n test:\n - CMD\n - healthcheck.sh\n - --connect\n - --innodb_initialized\n interval: 10s\n timeout: 5s\n retries: 30\n nextcloud:\n depends_on:\n db:\n condition: service_healthy\n redis:\n condition: service_healthy\n entrypoint:\n - /bin/sh\n - -ec\n - \"umask 077\\nphp -r '$dir = '\\\"'\\\"'/config/www/nextcloud/config'\\\"'\\\"';\\nif (!is_dir($dir)\\\n \\ && !mkdir($dir, 0770, true)) { throw new RuntimeException('\\\"'\\\"'Cannot create\\\n \\ the Nextcloud config directory'\\\"'\\\"'); }\\nif (!is_file($dir . '\\\"'\\\"'/config.php'\\\"\\\n '\\\"') && !is_file($dir . '\\\"'\\\"'/autoconfig.php'\\\"'\\\"')) {\\n foreach (['\\\"\\\n '\\\"'MYSQL_HOST'\\\"'\\\"', '\\\"'\\\"'MYSQL_DATABASE'\\\"'\\\"', '\\\"'\\\"'MYSQL_USER'\\\"'\\\"\\\n ', '\\\"'\\\"'MYSQL_PASSWORD'\\\"'\\\"'] as $name) {\\n if (getenv($name) ===\\\n \\ false || getenv($name) === '\\\"'\\\"''\\\"'\\\"') { throw new RuntimeException('\\\"\\\n '\\\"'Missing Nextcloud database setting: '\\\"'\\\"' . $name); }\\n }\\n $settings\\\n \\ = ['\\\"'\\\"'dbtype'\\\"'\\\"' => '\\\"'\\\"'mysql'\\\"'\\\"', '\\\"'\\\"'dbhost'\\\"'\\\"' => getenv('\\\"\\\n '\\\"'MYSQL_HOST'\\\"'\\\"'), '\\\"'\\\"'dbname'\\\"'\\\"' => getenv('\\\"'\\\"'MYSQL_DATABASE'\\\"\\\n '\\\"'), '\\\"'\\\"'dbuser'\\\"'\\\"' => getenv('\\\"'\\\"'MYSQL_USER'\\\"'\\\"'), '\\\"'\\\"'dbpass'\\\"\\\n '\\\"' => getenv('\\\"'\\\"'MYSQL_PASSWORD'\\\"'\\\"'), '\\\"'\\\"'directory'\\\"'\\\"' => '\\\"\\\n '\\\"'/data'\\\"'\\\"'];\\n $path = $dir . '\\\"'\\\"'/autoconfig.php'\\\"'\\\"';\\n if\\\n \\ (file_put_contents($path, \\\" true, '\\\"'\\\"'memcache.local'\\\"\\\n '\\\"' => '\\\"'\\\"'\\\\OC\\\\Memcache\\\\APCu'\\\"'\\\"', '\\\"'\\\"'memcache.locking'\\\"'\\\"' =>\\\n \\ '\\\"'\\\"'\\\\OC\\\\Memcache\\\\Redis'\\\"'\\\"', '\\\"'\\\"'redis'\\\"'\\\"' => ['\\\"'\\\"'host'\\\"\\\n '\\\"' => '\\\"'\\\"'redis'\\\"'\\\"', '\\\"'\\\"'port'\\\"'\\\"' => 6379, '\\\"'\\\"'timeout'\\\"'\\\"\\\n ' => 0.0]];\\n if (file_put_contents($path, \\\" '\"'\"'mysql'\"'\"', '\"'\"'dbhost'\"'\"' => getenv('\"'\"'MYSQL_HOST'\"'\"'), '\"'\"'dbname'\"'\"' => getenv('\"'\"'MYSQL_DATABASE'\"'\"'), '\"'\"'dbuser'\"'\"' => getenv('\"'\"'MYSQL_USER'\"'\"'), '\"'\"'dbpass'\"'\"' => getenv('\"'\"'MYSQL_PASSWORD'\"'\"'), '\"'\"'directory'\"'\"' => '\"'\"'/data'\"'\"'];\n $path = $dir . '\"'\"'/autoconfig.php'\"'\"';\n if (file_put_contents($path, \" true, '\"'\"'memcache.local'\"'\"' => '\"'\"'\\OC\\Memcache\\APCu'\"'\"', '\"'\"'memcache.locking'\"'\"' => '\"'\"'\\OC\\Memcache\\Redis'\"'\"', '\"'\"'redis'\"'\"' => ['\"'\"'host'\"'\"' => '\"'\"'redis'\"'\"', '\"'\"'port'\"'\"' => 6379, '\"'\"'timeout'\"'\"' => 0.0]];\n if (file_put_contents($path, \" '\\\"'\\\"'mysql'\\\"'\\\"', '\\\"'\\\"'dbhost'\\\"'\\\"' => getenv('\\\"\\\n '\\\"'MYSQL_HOST'\\\"'\\\"'), '\\\"'\\\"'dbname'\\\"'\\\"' => getenv('\\\"'\\\"'MYSQL_DATABASE'\\\"\\\n '\\\"'), '\\\"'\\\"'dbuser'\\\"'\\\"' => getenv('\\\"'\\\"'MYSQL_USER'\\\"'\\\"'), '\\\"'\\\"'dbpass'\\\"\\\n '\\\"' => getenv('\\\"'\\\"'MYSQL_PASSWORD'\\\"'\\\"'), '\\\"'\\\"'directory'\\\"'\\\"' => '\\\"\\\n '\\\"'/data'\\\"'\\\"'];\\n $path = $dir . '\\\"'\\\"'/autoconfig.php'\\\"'\\\"';\\n if\\\n \\ (file_put_contents($path, \\\" true, '\\\"'\\\"'memcache.local'\\\"\\\n '\\\"' => '\\\"'\\\"'\\\\OC\\\\Memcache\\\\APCu'\\\"'\\\"', '\\\"'\\\"'memcache.locking'\\\"'\\\"' =>\\\n \\ '\\\"'\\\"'\\\\OC\\\\Memcache\\\\Redis'\\\"'\\\"', '\\\"'\\\"'redis'\\\"'\\\"' => ['\\\"'\\\"'host'\\\"\\\n '\\\"' => '\\\"'\\\"'redis'\\\"'\\\"', '\\\"'\\\"'port'\\\"'\\\"' => 6379, '\\\"'\\\"'timeout'\\\"'\\\"\\\n ' => 0.0]];\\n if (file_put_contents($path, \\\" '\"'\"'mysql'\"'\"', '\"'\"'dbhost'\"'\"' => getenv('\"'\"'MYSQL_HOST'\"'\"'), '\"'\"'dbname'\"'\"' => getenv('\"'\"'MYSQL_DATABASE'\"'\"'), '\"'\"'dbuser'\"'\"' => getenv('\"'\"'MYSQL_USER'\"'\"'), '\"'\"'dbpass'\"'\"' => getenv('\"'\"'MYSQL_PASSWORD'\"'\"'), '\"'\"'directory'\"'\"' => '\"'\"'/data'\"'\"'];\n $path = $dir . '\"'\"'/autoconfig.php'\"'\"';\n if (file_put_contents($path, \" true, '\"'\"'memcache.local'\"'\"' => '\"'\"'\\OC\\Memcache\\APCu'\"'\"', '\"'\"'memcache.locking'\"'\"' => '\"'\"'\\OC\\Memcache\\Redis'\"'\"', '\"'\"'redis'\"'\"' => ['\"'\"'host'\"'\"' => '\"'\"'redis'\"'\"', '\"'\"'port'\"'\"' => 6379, '\"'\"'timeout'\"'\"' => 0.0]];\n if (file_put_contents($path, \"isDot() || !$file->isFile()) { continue; } + $target = $dir . '/' . $file->getFilename(); + if (!file_exists($target) && !copy($file->getPathname(), $target)) { throw new RuntimeException('Cannot seed the Nextcloud configuration'); } + } + } + $settings = ['dbtype' => 'mysql', 'dbhost' => getenv('MYSQL_HOST'), 'dbname' => getenv('MYSQL_DATABASE'), 'dbuser' => getenv('MYSQL_USER'), 'dbpass' => getenv('MYSQL_PASSWORD'), 'directory' => '/data']; + $path = $dir . '/autoconfig.php'; + if (file_put_contents($path, " true, 'memcache.local' => '\OC\Memcache\APCu', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => ['host' => 'redis', 'port' => 6379, 'timeout' => 0.0]]; + if (file_put_contents($path, " true];') subprocess.run(['/bin/sh', '-ec', script], env=env, check=True, capture_output=True) self.assertFalse(autoconfig.exists()) + self.assertFalse((folder / 'CAN_INSTALL').exists()) if __name__ == '__main__': unittest.main()