Skip to content
Snippets Groups Projects
Commit 69755fc0 authored by nimrod's avatar nimrod
Browse files

Post on notify.shore.co.il.

parent 19093668
No related branches found
No related tags found
No related merge requests found
Pipeline #1416 passed
Spam me - Update #2
===================
:date: 2021-05-10
:summary: Another update the spam ma page.
Previously `I wrote <../spam_me/>`_ about the `spam me page
<https://www.shore.co.il/spam>`_ and later an `update <../spam-me-update>`_ on
how things were going.
Things were stable and I didn't get any spam. But something bothered me. I would
only get notifications on my laptop and only when it was on. Notifications would
be lost if the laptop was offline. Also, `Patchbay <https://patchbay.pub/>`_ had
downtime a few months back and I didn't get notifications at all. Lastly, I'm
keen on self-hosting.
Nextcloud Notifier
------------------
Nextcloud has a notification mechanism that is used internally. I get
notifications on pending updates on my cellphone and laptop. Pushing
notifications over HTTP requires authentication, but using the ``occ`` CLI
doesn't require authentication.
I wrote a `simple web service
<https://git.shore.co.il/nimrod/nextcloud-notifier>`_ to post messages through
the Nextcloud notification mechanism. The service runs the ``occ`` command using
``docker exec`` so usage is anonymous. Notifications are received on both
cellphone and laptop and I'm content. Now you can `send me messages
<https://www.shore.co.il/spam>`_
and I'll always get it.
Future uses
-----------
Now that I have a notification service, I saw more uses than I originally
envisioned. I send notification on failed Cron jobs, for example:
.. code:: shell
backup || wget --spider https://notify.shore.co.il/send?message=Backup%20failed.
I have CI jobs that run on a schedule (rebuilding container images) so now I
have a `GitLab CI template
<https://git.shore.co.il/shore/ci-templates/-/blob/master/templates/notify.yml>`_
that sends me a message if the CI pipeline failed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment