crazy-max / docker-nextcloud

Nextcloud Docker image
MIT License
245 stars 47 forks source link

previewgen not working #136

Closed EddieFAF closed 5 months ago

EddieFAF commented 1 year ago

Support guidelines

I've found a bug and checked that ...

Description

When enabling the previewgen sidecar container, the cronjob isn't working because the command used ("occ preview:pre-generate") does not exist. Therefore no previews are generated.

Expected behaviour

previews are generated

Actual behaviour

previewgen sidecar not running command, because command unknown

Steps to reproduce

activate previewgen sidecar watch logs

Docker info

Client: Docker Engine - Community
 Version:    24.0.5
 Context:    default
 Debug Mode: false

Server:
 Containers: 57
  Running: 57
  Paused: 0
  Stopped: 0
 Images: 55
 Server Version: 24.0.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.10.0-21-amd64
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.679GiB
 Name: odyssee
 ID: 2G5U:NJJK:26OB:HYGG:C47J:JCGW:EZY7:HFYL:OET2:3YYQ:LVQH:MHSY
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

No response

Logs

04.09.2023 21:00:00
crond: USER nextcloud pid 7287 cmd php -f /var/www/occ preview:pre-generate
04.09.2023 21:00:01
04.09.2023 21:00:01

04.09.2023 21:00:01
  Command "preview:pre-generate" is not defined.  
04.09.2023 21:00:01

04.09.2023 21:00:01
  Did you mean one of these?                      
04.09.2023 21:00:01
      notification:generate                       
04.09.2023 21:00:01
      preview:generate                            
04.09.2023 21:00:01
      preview:repair                              
04.09.2023 21:00:01
      preview:reset-rendered-texts                
04.09.2023 21:00:01

04.09.2023 21:00:01

Additional info

No response

MaddoScientisto commented 7 months ago

This seems to not be a container problem, looks like you have to install the "preview generator" app from the multimedia section to get the command

https://apps.nextcloud.com/apps/previewgenerator

https://github.com/nextcloud/nextcloudpi/issues/1349

I'm still trying to get this to work myself

crazy-max commented 5 months ago

I don't have any issues making preview generator work on my side.

Like @MaddoScientisto said, you need to install this app: https://apps.nextcloud.com/apps/previewgenerator

And might as well add this nextcloud config in config.php:

  'enable_previews' => true,
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'preview_max_scale_factor' => 1,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\Movie',
    5 => 'OC\\Preview\\MKV',
    6 => 'OC\\Preview\\MP4',
    7 => 'OC\\Preview\\AVI',
  ),

More info: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/previews_configuration.html