LycheeOrg/Lychee-Docker

Lost all albums after update

Closed this issue · 9 comments

Hello,

I just updated my Lychee docker installation from 4.6.0 to 4.7.0, simply by stopping the stack, updating the docker image and starting again via docker-compose.
Everything went on fine, migration was processed with no errors or warnings.
But when the stack was restarted, all my albums were gone.
What can I do ?

Hi,

Same here, using Portainer, after update to version 5.0.2, web interface and login worked fine (settings also work fine), but there seems to be a broken link between Lychee and the photos in MariaDB, because they don't appear anymore, although all the names are still there with the details of each photos in their place holders in the different albums i have, it's just the photos themselves that do not show anymore.

I've checked Diagnostics, and have 2 warnings and 3 errors:

Diagnostics
Warning: Dropbox import not working. dropbox_key is empty.
Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
Error: APP_URL does not match the current url. This will break WebAuthn authentication.
Error: APP_URL does not match the current url. This will prevent images to be properly displayed.
Info: Latest version of PHP is 8.3
Error: /app/www/.git (and subdirectories) are not executable, check the permissions

I also have quite a few odd entries in Portainer Lychee's logs:

using keys found in /config/keys
**** Make sure the uploads (pictures), sym, and logs folders exist ****
**** Create the symbolic link for the uploads folder ****
**** Create the symbolic link for the sym folder ****
**** Create the symbolic link for the logs folder ****
**** Create user.ini for php settings ****
cp: not replacing '/config/user.ini'
Connection to mariadb (172.20.0.2) 3306 port [tcp/mysql] succeeded!
**** Copy the .env to /config ****
**** Inject .env values ****
**** Make sure user.css exists and symlink it ****
**** Make sure custom.js exists and symlink it ****
**** Make sure Laravel's log exists ****
**** Set Permissions ****
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│ old date │ new date │ path │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2022-08-20 │ 2023-08-13 │ /config/nginx/ssl.conf │
│ 2023-04-13 │ 2023-12-25 │ /config/nginx/site-confs/default.conf │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
INFO No scheduled commands are ready to run.
INFO No scheduled commands are ready to run.

The last line just keeps repeating itself.

There's also some weird entries in lychee-mariadb logs:

cp: not replacing '/config/custom.cnf'
[custom-init] No custom files found, skipping...
231226 13:28:09 mysqld_safe Logging to '/config/databases/0a01f4f0df02.err'.
231226 13:28:10 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.

Hope someone will find out what's going on and get it fixed on the next update.
Or maybe give us some instructions on how to fix it ourselves...
;-)

Error: APP_URL does not match the current url. This will prevent images to be properly displayed.

At the risk of stating the obvious, have you set APP_URL correctly?

I don't even know where to find/modify that APP_URL !?
*** Ok i'm editing this comment as i found the file .env and APP_URL and it's set to:
APP_URL=http://localhost ***

I installed the stack lychee/mariadb via a template (docker-compose) in portainer, never had to deal with those variables/settings:

version: "3"
services:
mariadb:
image: linuxserver/mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
PGID: ${PGID}
PUID: ${PUID}
TZ: ${TZ}
networks:
- lychee-mariadb_network
restart: unless-stopped
volumes:
- /portainer/Files/AppData/Config/Lychee/Mariadb:/config

lychee:
container_name: lychee
hostname: lychee
image: linuxserver/lychee:latest
environment:
DB_HOST: 'mariadb'
DB_USERNAME: ${DATABASE_USER}
DB_PASSWORD: ${DATABASE_PASSWORD}
DB_DATABASE: ${DATABASE_NAME}
DB_PORT: 3306
PGID: ${PGID}
PUID: ${PUID}
TZ: ${TZ}
networks:
- lychee-mariadb_network
ports:
- 84:80
restart: unless-stopped
volumes:
- /portainer/Files/AppData/Config/Lychee/config:/config
- /portainer/Pictures:/pictures
depends_on:
- mariadb

networks:
lychee-mariadb_network:

You should be able to add it with e.g. DB_HOST, or you may need to find an updated template. I have zero experience with portainer.
Alternatively, you can edit in that .env file, which would be the normal approach for non-docker setups.

Ok, cool, i don't mind editing it myself, i have access to the .env file, so what should i be adding in there and where ?

Here are the first few lines in that file (i've checked further down the file and everything seems to be setup correctly)
(is APP_URL set right?):

APP_NAME=Lychee
APP_ENV=production
APP_KEY=base64:C3zi2FP2iSmPfWug4vX7IHalPtGEqGtiS2z2JD9K0AM=
APP_DEBUG=false
APP_URL=http://localhost
APP_FORCE_HTTPS=false

edit Ok for DB_HOST, it's already in there further down the file:

DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=lychee
DB_USERNAME=lychee
DB_PASSWORD=***********
DB_LOG_SQL=false

Ok, i'm insomniac because of severe multiple tinnitis, which explains why i'm half blind...LOL Just can't concentrate at all...
I kept looking at the URL "http://localhost" without seeing it was NOT the right URL....!"!?%$!

I've just set it up correctly, and the photos are back !

Don't know if the rest of the other errors need any attention, but the main problem is solved for me !!

Good luck to archpanda for solving the problem too...
Thanks for the support
Have a nice day/year
;-)

@Archpanda Do you have your APP_URL set? Do you have any such warnings or errors in your diagnostics?

my docker-compose.yml ports: is - 5500:80. so,i set APP_URL=http://localhost:5500. it fine work

Seems to be fixed. Plus we took care of it in the Lychee repo.