Difegue / LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.

Home Page:https://lrr.tvc-16.science

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uploaded plugins gone if docker container recreated

theggs opened this issue · comments

LRR Version and OS
Docker
LANraragi v0.9.0

Bug Details
Uploaded plugins are store in home/koyomi/lanraragi/lib/LANraragi/Plugin along with the default plugins. This directory is come from the image.
As a result, when docker container recreate(e.g. for version upgrading, env vars updating), the directory will be restored, the uploaded plugins would gone. I have to upload the plugins, and configurate them again.

Expected: user uploaded plugins are put in an independent directory, so we can mount a local path to it.

Matching Logs
Post any logs you have encountered when reproducing the bug.
If possible, switch the app to Debug Mode in order to have more logs.
No Logs.

Screenshots
If applicable, add screenshots to help explain your problem.

I feel like this is a non-issue.

You should be able to make a volume map between the plugin folder in LANraragi to a system folder. It will keep any new/updated plugins and the database file will keep the settings.

Here is the command I ran to map the two folders.
image

@Nixis198
I thought the local emty directory will overwrite the one in container when first running.
Let me try it and feedback. Thanks.

@Nixis198
It does as I expected: mounting an empty directory would overwrite the oraginal path. All plugins are gone after startup. So it is not a solution.

I made a pull request that adds the plugins folder to the dockerfile. So it should be easier to add when making your container.
You will still have to reupload your plugins when/if this is accepted, but once you do it once you should be good. All your plugins will be stored not in the container, but in a local folder, and the database file should store your plugin settings.

I made a pull request that adds the plugins folder to the dockerfile. So it should be easier to add when making your container. You will still have to reupload your plugins when/if this is accepted, but once you do it once you should be good. All your plugins will be stored not in the container, but in a local folder, and the database file should store your plugin settings.

it is a good idea to use VOLUME! Thank you!

Another workaround is to directly mount the .pm file to the plugin dir

-v /path/to/your/fantasticPlugin.pm:/home/koyomi/lanraragi/lib/LANraragi/Plugin/<type>/fantasticPlugin.pm

Edit: I just relized that LRR just checks all subdirs under Plugin, so if you have a lot of plugins to manage, you can also mount a custom subdir

-v /path/to/your/plugins/:/home/koyomi/lanraragi/lib/LANraragi/Plugin/User

@chierinyan
the uploaded plugins are put direct in Plugin. So even it checks all subdirs, the plugins wouldn't be in any subdirs.

You can mount a subdir and just put the plugin in that subdir yourself rather than uploading via LANraragi.

@shinji257 I understand what you mean. It can be treated as a workaround, rather than be a end user-oriented resolution.

I've added a Sideloaded directory in the Plugins folder and Dockerfile, which behaves as mentioned in the comments above.
Thanks for everyone's input on this!