You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Valentin Lab 91bfd7ba9b fix: [gogocarto] improve solidity of cron scripts facing the ``no-matching-entries`` bug 2 weeks ago
hooks new: [ntfy] add charm 4 months ago
lib new: [ntfy] add Firebase Cloud Messaging (FCM) support 4 months ago new: [ntfy] add some minimal documentation on the ``ntfy`` command line and authentication options 4 months ago
metadata.yml new: [ntfy] add charm 4 months ago


Basic usage

    ## These are default of the charm (different from default of `ntfy`)
    #auth-default-access: deny-all
    #enable-signup: false
    #enable-login: true
    #enable-reservations: true

Any option from the help of ntfy can be used, to the exception of firebase-key-file.

To setup firebase, there are some slight differences you can find here.

Creating an admin account

By default, ntfy doesn't provide any account nor permissions. This charm will enforce a different stance, and by default will not allow anything without permission.

If you want to follow this route, you'll need to create an admin account:

You need to attach to the ntfy container:

docker exec -ti myproject_ntfy_1 sh
ntfy user add --role=admin admin

Adding user

For listening topics

ntfy user add myuser

To set access to topics

ntfy access myuser mytopic read-only

Create a token for a user

This allows to give a kind of secret key that is revokable. You would do this to distribute access to services that would need to send notification.

To create a token from a user:

ntfy token add admin

Connection with Firebase

I you build your own Android/IOS ntfy app, you can use Firebase Cloud Messaging (FCM) to send notification through official channel. To configure your server to send notification with Firebase you can:

    firebase: ## content of your firebase service key file in yaml
      type: service_account
      project_id: myfirebase-project
      private_key_id: 0ebce...41480
      private_key: |
        -----BEGIN PRIVATE KEY-----
        -----END PRIVATE KEY-----
      client_id: "101777552980915316312"

To produce the output from the private service key file you created in Firebase you could:

cat myfirebase-project-firebase-adminsdk-fxdhj-6eaewk4a4.json | yq -p json -o yaml

To get more information about how to deploy your own app ntfy's doc about FCM might be helpful.