1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 01:08:37 +00:00

update ntfy

This commit is contained in:
kev 2024-05-22 18:13:22 +08:00
parent f3fb70e967
commit 26c11ccc49
3 changed files with 32 additions and 3 deletions

@ -5,6 +5,8 @@ ntfy
With ntfy, you can **send notifications to your phone or desktop via scripts** from
any computer, **without having to sign up or pay any fees**.
## up and running
```bash
$ mkdir -p data/{etc,log,var}
$ docker compose up -d
@ -15,10 +17,28 @@ $ docker compose exec nify sh
>>> ntfy access pi test rw
>>> ntfy access '*' test ro
>>> ntfy access
>>> ntfy token add --expires=1w --label=pi5 pi
>>> ntfy token add --expires=1y --label=iphone kev
>>> ntfy token add --expires=30d --label=pi5 pi
>>> ntfy token add --expires=90d --label=win kev
>>> ntfy token list
>>> exit
$ curl http://127.0.0.1:2586
```
## client setup
- Linux: ~/.config/ntfy/client.yml
- MacOS: ~/Library/Application Support/ntfy/client.yml
```yaml
default-host: http://127.0.0.1:2586
default-user: kev
default-password: "******"
#default-token: "******"
```
```bash
$ ntfy sub test
$ ntfy pub test "This is a message"
```
[1]: https://docs.ntfy.sh/config/

9
ntfy/data/etc/client.yml Normal file

@ -0,0 +1,9 @@
#
# - https://docs.ntfy.sh/publish/
# - https://github.com/binwiederhier/ntfy/blob/main/client/client.yml
#
default-host: "https://ntfy.easypi.duckdns.org"
default-token:
default-user:
default-password:

@ -12,7 +12,7 @@ cache-file: "/var/lib/ntfy/cache.db"
attachment-cache-dir: "/var/lib/ntfy/attachments"
log-level: "info"
log-format: "json"
log-file: "/var/log/ntfy.log"
log-file: "/var/log/ntfy/ntfy.log"
#smtp-sender-addr: "email-smtp.us-east-2.amazonaws.com:587"
#smtp-sender-user: "AKIDEADBEEFAFFE12345"