A small JSON API server for delivering notifications using Apprise.
- Notification services can be configured using an environment variable.
- The service listens for JSON-formatted notification messages on port 5000.
This service is suitable as a sidecar service to another service in a container-based cluster.
These are quickstart instructions using Docker Compose.
- Copy
app.env.example
toapp.env
- Set
NOTIFICATION_URLS
inapp.env
according to the documentation. You can add multiple targets, separated by commas. - Start the container:
docker-compose up
- In another terminal, you should now be able to trigger a notification using curl:
curl -X POST --data '{"title": "my notification title", "body": "what a great notification service!"}' localhost:5000
See the file docker-compose.example.yml for a better example on how this supposed to work.
If running on a docker swarm cluster docker secrets can be used to set the notification URLS to avoid leaking credentials through environment variables:
- Set up the secret with the same content as you would with the regular environment variable
- Attach the secret to the service
- Set the
NOTIFICATION_URLS_FILE
to the path where the secret is mounted in the service