redimp / otterwiki

A minimalistic wiki powered by python, markdown and git.
https://otterwiki.com
MIT License
648 stars 29 forks source link

Docs: How do plugins work? #119

Closed kylelaverty closed 5 months ago

kylelaverty commented 5 months ago

Looking at the existing docs around the plugins it is not exactly clear what to do with the sample plugins. Where do I put them? How do I get them to work with the Docker image?

Some enhancements to the docs would be greatly appreciated.

redimp commented 5 months ago

Hey @kylelaverty, thank you for bringing this up.

Currently the plugins have to be installed in the virtual environment that the app uses. For running this in docker, you would have to build your own docker image with the specific environment.

To make this a little easier to implement for a plugin user, a volume could be mounted in the container e.g. into /plugins and the entrypoint.sh would run pip install . each directory in the mounted folder ...

I will look into that tonight later this week.

kylelaverty commented 5 months ago

Hey,

Thanks for the quick response. I guess I had incorrectly thought there was a specific folder to create and the wiki would scan for it and load what was there but given the use of pip this explanation makes a lot of sense.

redimp commented 5 months ago

With the change to the entrypoint.sh the docker image will kind of do what you expected. This should make it much more approachable to develop or use plugins.

This improvement will we included in the next release. Thanks for bringing this up!

redimp commented 5 months ago

With the v2.4.3 the docker image installs plugins from either /plugins or /app-data/plugins. The examples in docs/plugin_examples provide a docker-compose.yaml as demo.