• 0 Posts
  • 42 Comments
Joined 10 months ago
cake
Cake day: August 26th, 2023

help-circle


  • Set image tag in pictrs section to 0.5 and change to the new ENV format described in the docs of pictrs. At last start only the pictrs container docker compose up -d pictrs

    Here is my example in the new formaz. Be aware it is just an example ☝🏻

    
    pictrs:
        image: asonix/pictrs:0.5
        container_name: lemmy-pictrs
        # this needs to match the pictrs url in lemmy.hjson
        hostname: pictrs
        # we can set options to pictrs like this, here we set max. image size and forced format for conversion
        # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
        environment:
          - PICTRS_OPENTELEMETRY_URL=http://otel:4137
          - PICTRS__SERVER__API_KEY=redacted
          - RUST_LOG=info
          - RUST_BACKTRACE=full
          - PICTRS__MEDIA__VIDEO__VIDEO_CODEC=vp9
          - PICTRS__MEDIA__ANIMATION__MAX_WIDTH=256
          - PICTRS__MEDIA__ANIMATION__MAX_HEIGHT=256
          - PICTRS__MEDIA__ANIMATION__MAX_AREA=65536
          - PICTRS__MEDIA__ANIMATION__MAX_FRAME_COUNT=400
        user: 991:991
        volumes:
          - ./volumes/pictrs:/mnt:Z
        restart: always
        logging: *default-logging
        deploy:
          resources:
            limits:
              memory: 690m
    
    











  • “Way faster” came from me :D

    It is the complete package which makes it way faster…

    Postgres, Redis, PHP Opcache, general PHP tweaks ( PHP.ini, child processes etc, use calculator ), HTTP-2 instead of 1.1

    For HTTP-2, you can add this for Apache in your vhost:

    Protocols h2 h2c http/1.1

    For example:

    <VirtualHost *.80>
    ServerAdmin admin@server.com
    DocumentRoot /var/www/html/nextcloud/
    ServerName my.domai.com
    Protocols h2 h2c http/1.1
    
    ....
    

    In NGNIX add this in a new line:

    http2 on;

    For example:

    server {
      listen 80;
      listen [::]:80;
      server_name my.domain.com;
      http2 on;
    
    ....
    

    Using NGINX over Apache did nothing for me, so I use Apache with PHP-FPM 8.3, because I am using it for Wordpress too, same for Redissockets. I would recommend not to use a docker container for Nextcloud. I don’t like it for Nextcloud and I don’t use docker for Wordpress. Docker has other use cases in my setup, but not those 2.

    This is just my personal setup.

    Maybe it can help someone :)