Month: January 2023

Spanish Juggling problem

These are some notes to be shared about a specific kind of problem I am thinking about since yesterday.

Problem formulation

You are given a list of persons P, a list of capabilities (or skills) C, and a list of all the capabilities per person. A person can have any number of capabilities. For each capability, there is at least one person who possesses it. Find the smallest set of persons so that they, in total, have all capabilities.

(Optional:) If there are multiple possible smallest sets, find them all.

Read More

Changing the maximum upload file size with Nextcloud in a docker-compose setup

The Nextcloud documentation as of today does not mention how to adjust the settings for uploading large files when using Nextcloud in a docker-compose setup (or generally in a Docker container). It does mention, however, that the following PHP settings need to be adjusted:

php_value upload_max_filesize 16G
php_value post_max_size 16G

So the issue is reduced to finding out how these values can be changed for the container running the Nextcloud image in the simplest way.

Most of the sites I found while trying to solve this recommend adding or changing an ini file in the container (e.g. setting up a bind mount). But this can actually be solved in a much simpler and potentially less fragile way! Check out this excerpt from an nextcloud.ini file inside the main Nextcloud container:

$ sudo docker exec -it nextcloud_app bash
root@42b3ec8ee31f:/var/www/html# grep -E '(upload_max_filesize|post_max_size)' /usr/local/etc/php/conf.d/nextcloud.ini 
upload_max_filesize=${PHP_UPLOAD_LIMIT}
post_max_size=${PHP_UPLOAD_LIMIT}

Read More