docker-zulip icon indicating copy to clipboard operation
docker-zulip copied to clipboard

Thumbnails not working anymore in Zulip 3.0 - can I have help to get it working in docker?

Open maltokyo opened this issue 3 years ago • 2 comments

Zulip team had some tech troubles (outlined in detail by the kind guys here: https://chat.zulip.org/#narrow/stream/48-mobile/topic/Thumbnails.20in.20mobile.20apps.20not.20working and here: https://github.com/zulip/docker-zulip/issues/236 ) and in short, had to drop support for thumbor in Zulip 3.0 ( @timabbott please correct me if I got it wrong).

Unfortunately, this change was not mentioned in the release notes, which was a surprise - at least my users are heavy photo posters, and this functionality was imperative for me, so I have gone back to Zulip 2.1.7 docker.

The official docs of thumbor have minimalcompact/thumbor listed as the docker version, so I chose that one.

I have made this docker-compose.yml file:

version: '2'
services:
  zulipstippy_thumbor:
    image: 'minimalcompact/thumbor'
    container_name: mydomain_thumbor
    ports:
      - '8888:80'

and tested it with these lines in the docker-compose.yml file of Zulip:

      SETTING_THUMBNAIL_IMAGES: 'True'
      SETTING_THUMBOR_URL: 'http://thumbs.mydomain.com:8888'

It is detected by Zulip, and it is trying to use the thumbor service as intended (I can see entires as below the logs) but it keeps throwing this error for every single thumbnail that it tries to make:

mydomain_thumbor   | 2020-08-04 20:55:50 thumbor:WARNING Malformed URL: /8FSW_Ws3rzr9sgvQCCqHGTOsL7w=/0x300/smart/filters:no_upscale():sharpen(0.5,0.2,true)/L3VzZXJfdXBsb2Fkcy8yL2EzL001VnhxMUhBVVhOcTJZTU01ZVQzc3JKMC9JTUdfMjAyMDAzMDhfMjIwNDIyLmpwZw==/source_type/local_file
mydomain_thumbor   | 2020-08-04 20:55:50 tornado.access:WARNING 400 GET /8FSW_Ws3rzr9sgvQCCqHGTOsL7w=/0x300/smart/filters:no_upscale():sharpen(0.5,0.2,true)/L3VzZXJfdXBsb2Fkcy8yL2EzL001VnhxMUhBVVhOcTJZTU01ZVQzc3JKMC9JTUdfMjAyMDAzMDhfMjIwNDIyLmpwZw==/source_type/local_file (94.16.175.196) 2.16ms

Can anyone who is well versed in docker (and Zulip?) help me to get this working? I have enabled this docker at: http://ssd.stippy.com:8888/ In case someone wants to give it a try.. but no matter what images I throw at it, it always gives me the Malformed URL error...

@timabbott if it works (after getting help here), I will make a pull request, and get it all in the docker version at least, in case it won't be reinstated in the main Zulip implementation.

maltokyo avatar Aug 04 '20 21:08 maltokyo

I suspect what's missing is that one needs to specify the signing secrets to use for thumbor; this is thumbor_key in zulip-secrets.conf in a normal Zulip installation. So the URLs being passed are all invalid because the key isn't shared properly between the containers.

timabbott avatar Aug 04 '20 22:08 timabbott

Thank you for the hint. Will give it a try on the weekend!

maltokyo avatar Aug 04 '20 22:08 maltokyo