loeeeee / immich-in-lxc

Install Immich in LXC with optional CUDA support
60 stars 8 forks source link

UPLOAD_DIR does not get soft-linked to upload directory correctly, losing all thumbnails during upgrade #4

Closed loeeeee closed 3 months ago

loeeeee commented 3 months ago

Currently, the UPLOAD_DIR upload folder does not get softlinked to upload folder inside the app folder in INSTALL_DIR. Instead, it will keep its original name.

For example, if one set the UPLOAD_DIR=/mnt/DigiMem, the resulting soft link will be INSTALL_DIR/app/DigiMem, while the expected behavior is INSTALL_DIR/app/upload/ -> /mnt/DigiMem. Currently, an upload folder that is not linked to anywhere will be created, and all the thumbnails will be saved there.

The problem is that during upgrade, the app folder will be wiped, and so does all the thumbnails.

loeeeee commented 3 months ago

The issue no longer happens after commit ccdbf065c419fe3f754cc6f79b37aac34aa64aad .

loeeeee commented 3 months ago

However, to fix existing instance, following steps are needed.

Now, the thumbnail will be preserved between upgrade of immich instance.

loeeeee commented 3 months ago

Note that this would only happens if the UPLOAD_DIR in .env file does not end with upload.