waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
449 stars 70 forks source link

Whats the docker image tag for arm 64bit processor #18

Closed vutsalsinghal closed 2 years ago

vutsalsinghal commented 2 years ago

Hi there,

I'm unable to run using image: waschinski/photo-stream:latest on my Raspberry-pi 4 64bit. Couldn't find apt tag on dockerhub (https://hub.docker.com/r/waschinski/photo-stream/tags).

photo_stream_container |       Generating...
photo_stream_container | Configuration file: /photo-stream/_config.yml
photo_stream_container |   Liquid Exception: no start of image marker found in feed.xml
photo_stream_container |                     ------------------------------------------------
photo_stream_container |       Jekyll 4.2.0   Please append `--trace` to the `serve` command
photo_stream_container |                      for any additional information or backtrace.
photo_stream_container |                     ------------------------------------------------
photo_stream_container | /usr/local/bundle/gems/exifr-1.3.9/lib/exifr/jpeg.rb:102:in `examine': no start of image marker found
(EXIFR::MalformedJPEG)
photo_stream_container |        from /usr/local/bundle/gems/exifr-1.3.9/lib/exifr/jpeg.rb:34:in `block in initialize'
photo_stream_container |        from /usr/local/bundle/gems/exifr-1.3.9/lib/exifr/jpeg.rb:34:in `open'
photo_stream_container |        from /usr/local/bundle/gems/exifr-1.3.9/lib/exifr/jpeg.rb:34:in `initialize'
photo_stream_container |        from /photo-stream/_plugins/photo_filter.rb:8:in `new'
photo_stream_container |        from /photo-stream/_plugins/photo_filter.rb:8:in `block in photo_filter'
photo_stream_container |        from /photo-stream/_plugins/photo_filter.rb:7:in `each'
photo_stream_container |        from /photo-stream/_plugins/photo_filter.rb:7:in `sort_by'
photo_stream_container |        from /photo-stream/_plugins/photo_filter.rb:7:in `photo_filter'
photo_stream_container |        from /usr/local/bundle/gems/liquid-4.0.3/lib/liquid/strainer.rb:56:in `invoke'
photo_stream_container |        from /usr/local/bundle/gems/liquid-4.0.3/lib/liquid/context.rb:86:in `invoke'
photo_stream_container |        from /usr/local/bundle/gems/liquid-4.0.3/lib/liquid/variable.rb:84:in `block in render'
photo_stream_container |        from /usr/local/bundle/gems/liquid-4.0.3/lib/liquid/variable.rb:82:in `each'
photo_stream_container |        from /usr/local/bundle/gems/liquid-4.0.3/lib/liquid/variable.rb:82:in `inject'
waschinski commented 2 years ago

Hi, your container seems to be running fine though. Your actual error seems to be about the images you provided: no start of image marker found (EXIFR::MalformedJPEG) Maybe your mounts are not correctly set?

vutsalsinghal commented 2 years ago

This is what I have

docker-compose.yml

version: '3.7'

services:
  photo_stream:
    image: waschinski/photo-stream:latest
    container_name: photo_stream_container
    environment:
      - TITLE=${TITLE}
    volumes:
      - /home/pi/external_sdd/Pics/album1:/photo-stream/photos/original
    ports:
      - 25001:4000
    restart: unless-stopped

.env

TITLE=maxvoltar.photo
EMAIL=tim@maxvoltar.be
AUTHOR_NAME=Tim Van Damme
AUTHOR_EMAIL=tim@maxvoltar.be
AUTHOR_WEBSITE=https://maxvoltar.com
DESCRIPTION=
BASEURL=
URL=https://maxvoltar.photo/
SHOW_OFFICIAL_GITHUB=0
ALLOW_ORDER_SORT_CHANGE=1
PHOTO_PATH=./photos
TWITTER_USERNAME=
GITHUB_USERNAME=maxvoltar
INSTAGRAM_USERNAME=maxvoltar
CUSTOM_LINK_NAME=
CUSTOM_LINK_URL=
SYNCUSER=
SYNCPASS=
SYNCSERVER=
SYNCFOLDER=

inside album1 i've a lot of images.

waschinski commented 2 years ago

Try using a folder with a single image from album1 then start adding more if it works. Pretty sure one of your images is borked causing the MalformedJPEG error.

vutsalsinghal commented 2 years ago

you're right i copied 10 images to new dir and it worked... any way to skip/ignore unreadable images? also i've like 4k images in the folder so is there pagination support in the final result ?

waschinski commented 2 years ago

You are right, it would be helpful if it would log the file name causing problems and skip it. I will look into that.

In regards to pagination, there's infinte scrolling and some lazy loading going on. I also don't see pagination as a good/better alternative option for this project.

waschinski commented 2 years ago

So I have been trying out some things and put these changes in the dev tag. Feel free to switch from latest to that and please provide feedback if you do so.

Malformed images should be checked and renamed (original name plus .malformed) and this should be visible in the the server log. I am not completely happy with the implementation right now though but for starters I think it's good enough considering I am actually not a Ruby developer. :D

vutsalsinghal commented 2 years ago

@waschinski I appreciate you spending time to fix the issue. I tried the dev image and and like you said, it renamed some images with .malformed extension but I got another error this time (unfortunately I lost the logs from that session).

So I've been exploring other options and have decided to switch to https://github.com/bpatrik/pigallery2 which serves most my needs for now. I shall be closing the issue.

nickelswitte commented 1 year ago

Hello! I had the same error. It turns out, photo-stream was not able to handle a .png file. Would it be possible to implement the handling of pngs?

If this is too difficult, maybe a more verbose error log would already help.

But thanks for this nice project!