name: notifier
services:
notifier:
container_name: notifier
image: maxname/notifier:latest
command:
# - "--server.host=0.0.0.0:8080" # default is "0.0.0.0:8080"
# - "--server.header=X-Api-Key" # default is "X-Api-Key"
- "--tokens.token1=cWWisJ2DeCK7zftHIEKHCryZOSJlWcov0gV9fuUp5rzyz1qLqbOh5DEHB0083kVE"
# - "--tokens.token2=yuggFBsZ2CIc3S2XzG5XbOXxjmJVtDl6Apd7J4quOOWOEpUCSW5IErDbuSss5kfX"
- "--services.service1.url=telegram://<<token>>@telegram?chats=<<chart>>" # see docs for shoutrrr here - https://containrrr.dev/shoutrrr/v0.8/services/overview/
- "--services.service1.tags=tag1,tag2"
- "--services.service1.tokens=token1,token2" # list of allowed tokens
# - "--services.service2.url=generic://example.com?@acceptLanguage=tlh-Piqd" # see docs for shoutrrr here - https://containrrr.dev/shoutrrr/v0.8/services/overview/
# - "--services.service2.tags=default" # will be one of default services
# - "--services.service2.tokens=token1" # list of allowed tokens
server
host
- listening address and port. Default is0.0.0.0:8080
.header
- header name for pass token. Default isX-Api-Key
.
tokens
{token_id}
- token for accept requests. Required at least one.
services
{service_id}
url
- url for run shoutrrr. Required. See docs.tags
- collection of tag names separated by comma. If you setdefault
tag -- this service will be one of default services. If not set - service will never runs.tokens
- collection of{token_id}
. If not set - service will never runs.
All props need to pass as command lines arguments. See example above.
curl --request POST \
--url http://localhost:8080/send \
--header 'X-Api-Key: cWWisJ2DeCK7zftHIEKHCryZOSJlWcov0gV9fuUp5rzyz1qLqbOh5DEHB0083kVE' \
--header 'content-type: application/json' \
--data '{
"message": "Hello, World!"
}'
curl --request POST \
--url http://localhost:8080/send \
--header 'X-Api-Key: cWWisJ2DeCK7zftHIEKHCryZOSJlWcov0gV9fuUp5rzyz1qLqbOh5DEHB0083kVE' \
--header 'content-type: application/json' \
--data '{
"title": "Meow",
"message": "Pet me"
}'
curl --request POST \
--url http://localhost:8080/send \
--header 'X-Api-Key: cWWisJ2DeCK7zftHIEKHCryZOSJlWcov0gV9fuUp5rzyz1qLqbOh5DEHB0083kVE' \
--header 'content-type: application/json' \
--data '{
"message": "Yo",
"tags": ["tag1"]
}'
Code | Body |
---|---|
200 | { "message": "OK" } |
400 | { "error": "Message" } |
403 | { "error": "Unauthorized" } |