Hi guys,
I have issues setting up the imaginary container for the preview generation on my AiO instance and I would like to ask, if you can help me.
I have set up NC Mastercontainer with following settings:
sudo docker run -d \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 8080:8080 \
--env APACHE_PORT=11000 \
--env APACHE_IP_BINDING=0.0.0.0 \
--env BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6" \
--env NEXTCLOUD_MEMORY_LIMIT=3072M \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
From the Mastercontainer I installed the imaginary Container (name: nextcloud-aio-imaginary) via the WebGUI. I then installed the Preview Generator App within NC.
For the configuration of the preview generation, I have following lines in my config.php:
'preview_max_x' => '1024',
'preview_max_y' => '1024',
'jpeg_quality' => '60',
'preview_max_memory' => '2048',
'preview_max_filesize_image' => '50',
'enabledPreviewProviders' =>
array (
1 => 'OC\\Preview\\Image',
2 => 'OC\\Preview\\MarkDown',
3 => 'OC\\Preview\\MP3',
4 => 'OC\\Preview\\TXT',
5 => 'OC\\Preview\\OpenDocument',
6 => 'OC\\Preview\\Movie',
7 => 'OC\\Preview\\Krita',
8 => 'OC\\Preview\\PNG',
9 => 'OC\\Preview\\JPEG',
10 => 'OC\\Preview\\GIF',
11 => 'OC\\Preview\\HEIC',
12 => 'OC\\Preview\\BMP',
13 => 'OC\\Preview\\XBitmap',
14 => 'OC\\Preview\\MKV',
15 => 'OC\\Preview\\MP4',
16 => 'OC\\Preview\\AVI',
17 => 'OC\\Preview\\PDF',
0 => 'OC\\Preview\\Imaginary',
),
'enable_previews' => true,
'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
In the logs of the nextcloud-aio-nextcloud container I can see the following line:
System config value preview_imaginary_url set to string http://nextcloud-aio-imaginary:9000
I can also ping the imaginary container from the nextcloud container, so the connection between the two containers should be fine.
However, when I start the preview generation with following commands:
docker exec -it nextcloud-aio-nextcloud /bin/bash
sudo -u www-data php occ preview:generate-all -vvv
I get two warnings in the first two lines:
Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.
This is kinda surprising, because the php memory limit for imaginary is set to 2048 MB and for NC itself it is 3072 MB.
What I also notice is, that the log of the imaginary container is empty and that the imaginary docker uses almost no resources (docker stats nextcloud-aio-imaginary: CPU 0-1% and 7 MB RAM).
So I assume the preview generation is done on the NC and not via imaginary.
What can I do to get the previews generated by imaginary?
Thank you very much for your help!
Maginos