tanmng / docker-chevereto-free

Dockerfiles for various release of Chevereto Free
38 stars 26 forks source link

SMB mounted 'images' folder #26

Closed 917huB closed 3 years ago

917huB commented 3 years ago

I've been fighting some issues with mounting a SMB share as the image store.

I mount a SMB share with the following autofs line

images          -fstype=cifs,credentials=/root/.imagessmbcredentials,uid=33,gid=33                                      ://192.168.20.20/ChevDataTest\$

and mount it into my container with the following docker run volume statement

            -v /mnt/images:/var/www/html/images \

The images folder appears as expected and is visibile withint he container with the correct www-data:www-data ownership, i.e

root@c915dfac3371:/var/www/html# ls -l
total 168
drwxr-xr-x 1 www-data www-data   4096 Dec  1 07:10 app
-rw-r--r-- 1 www-data www-data   1147 Dec  1 07:10 composer.json
-rw-r--r-- 1 www-data www-data 134107 Dec  1 07:10 composer.lock
drwxr-xr-x 4 www-data www-data   4096 Dec  1 07:10 content
-rw-r--r-- 1 www-data www-data    703 Dec  1 07:10 cron.php
drwxr-xr-x 2 www-data www-data      0 Dec  1 07:11 images
drwxr-xr-x 5 www-data www-data   4096 Dec  1 07:10 importing
-rw-r--r-- 1 www-data www-data    708 Dec  1 07:10 importing.php
-rw-r--r-- 1 www-data www-data    597 Dec  1 07:10 index.php
drwxr-xr-x 4 www-data www-data   4096 Dec  1 07:10 lib
drwxr-xr-x 2 www-data www-data   4096 Dec  1 07:10 sdk

When I try to upload a file, I see the file appear in the images folder, visibile from the container as

root@c915dfac3371:/var/www/html# ls -lR images/
images/:
total 0
drwxr-xr-x 2 www-data www-data 0 Dec  1 07:11 2020

images/2020:
total 0
drwxr-xr-x 2 www-data www-data 0 Dec  1 07:11 12

images/2020/12:
total 0
drwxr-xr-x 2 www-data www-data 0 Dec  1 07:11 01

images/2020/12/01:
total 79
-rwxr-xr-x 1 www-data www-data 46637 Dec  1 07:11 image.md.png
-rwxr-xr-x 1 www-data www-data 16605 Dec  1 07:11 image.png
-rwxr-xr-x 1 www-data www-data 16140 Dec  1 07:11 image.th.png

and I see 200 responses in the access for the POST and GET, i.e

Nov 30 23:11:57 dockerhost docker[3367052]: 192.168.90.33 - - [01/Dec/2020:07:11:57 +0000] "POST /json HTTP/1.1" 200 1742 "https://chevereto2.xxx.org/upload" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
Nov 30 23:12:00 dockerhost docker[3367052]: 192.168.90.33 - - [01/Dec/2020:07:12:00 +0000] "GET /explore/recent HTTP/1.1" 200 8873 "https://chevereto2.xxx.org/upload" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
Nov 30 23:12:01 dockerhost docker[3367052]: 192.168.90.33 - - [01/Dec/2020:07:12:01 +0000] "GET /content/images/system/default/logo.png HTTP/1.1" 304 125 "https://chevereto2.xxx.org/explore/recent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
Nov 30 23:12:01 dockerhost docker[3367052]: 192.168.90.33 - - [01/Dec/2020:07:12:01 +0000] "GET /images/2020/12/01/image.md.png HTTP/1.1" 200 46869 "https://chevereto2.xxx.org/explore/recent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
Nov 30 23:12:11 dockerhost docker[3367052]: 192.168.90.33 - - [01/Dec/2020:07:12:11 +0000] "GET /images/2020/12/01/image.md.png HTTP/1.1" 200 46869 "https://chevereto2.xxx.org/explore/recent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
Nov 30 23:12:11 dockerhost docker[3367052]: 192.168.90.33 - - [01/Dec/2020:07:12:11 +0000] "GET /images/2020/12/01/image.png HTTP/1.1" 200 16837 "https://chevereto2.xxx.org/explore/recent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"

however Chevereto doesn't display any images and all I see is a generic 500 error leaving me kinda stumped. If I use the local storage the images appear correctly. Any tips to troubleshoot would be really appreciated.

Added a screen grab of the Chrome console here and here

tanmng commented 3 years ago

It's an interesting issue. I'll set up an SMB mount and try to look into this.

@917huB If possible, please share your screenshots via Github upload, I'm not very comfortable clicking some strange links. Cheers

917huB commented 3 years ago

Thank you, let me know if you need any more info or testing - happy to help however I can. I hear you re github uploads. Sure thing.