caronc / apprise-api

A lightweight REST framework that wraps the Apprise Notification Library
https://hub.docker.com/r/caronc/apprise
MIT License
580 stars 50 forks source link

Where to store custom hooks using Docker? #108

Closed schklom closed 1 year ago

schklom commented 1 year ago

:question: Question According to https://github.com/caronc/apprise/wiki/decorator_notify#command-line-references, custom hooks on Linux are loaded from

~/.apprise/plugins
~/.config/apprise/plugins

The problem is that the container paths for mounts on Docker must be absolute, Docker cannot mount the container path ~/.apprise/plugins. So what is the absolute path for ~/? I tried to store a hook in /config, but it is not automatically recognized by the command line, much less through the YAML configuration on the WebUI.

When I run

curl -X POST -d '{"urls":"my_custom_hook://user:pass@url","body":"test body"}' \
    -H "Content-Type: application/json" \
    https://apprise-ip:8080/notify/

I am not sure how to specify where the custom hook is located, and the hook is not loaded by default.

schklom commented 1 year ago

@caronc Sorry to ping you, but do you have any idea? I tried to replace ~/ by /opt/apprise, and it doesn't work. I am not sure how to specify where the custom hook is located using the API, and the hook is not loaded by default.

caronc commented 1 year ago

I may need to add this to the environment variables, so you can set it and then exclusive mount the path locally.

Then they can show up inside the API

schklom commented 1 year ago

If it is too much trouble doing that, I think it would be fine to specify a fixed path where a user can store custom hooks.

Anyway, thank you for getting on the case :)

schklom commented 1 year ago

It's working, thank you again :)