Coder Social home page Coder Social logo

pushtify's Introduction

Pushtify

Pushtify is a Gotify to Pushover forwarder:

  • Gotify: a self hosted Open Source notification system, with an Android app.
  • Pushover: a PaaS closed source notification system. Available on iOS and Android.

Why this container image?

When I moved from Android to iOS, I was just too lazy to reconfigure the multiple dozens of apps that were sending notifications to my Gotify instance.

How it works

This container constantly listens for Gotify notifications through websocket and forwards received notifications to Pushover.

It uses the ntfy Python library to forward messages.

image

If the connection to Gotify is lost, the container will reinitiate the connection.

Requirements

  • a client token in Gotify
  • the gotify hostname
  • a pushover user key

Installation with Docker or Podman

docker run --name pushtify \
  -e GOTIFY_TOKEN=zzz \
  -e GOTIFY_HOST=gotify.example.org \
  -e PUSHOVER_USERKEY=xxx \
  ghcr.io/sebw/pushtify:latest
podman run --name pushtify \
  -e GOTIFY_TOKEN=zzz \
  -e GOTIFY_HOST=gotify.example.org \
  -e PUSHOVER_USERKEY=xxx \
  ghcr.io/sebw/pushtify:latest

Building the container image yourself

git clone https://github.com/sebw/pushtify
cd pushtify
docker build -t pushtify:latest .

Running Pushtify on Kubernetes

git clone https://github.com/sebw/pushtify
cd pushtify/kubernetes
vim deployment.yaml (edit your variables, ideally store them as k8s secrets)
kubectl apply -f deployment.yaml

If connection to Gotify websocket is lost, the Python script will stop and the liveness probe will fail, triggering a restart of the pod.

pushtify's People

Contributors

sebw avatar

Stargazers

mrz-secops-offsec avatar Yivey Nod avatar Vitus  avatar  avatar  avatar  avatar Arbal avatar Mario Spina avatar Samir Jafferali avatar Itsuki Hayashi avatar Jan avatar Rafal Perwinski avatar  avatar  avatar  avatar  avatar Evan Foster avatar absolute in doubt avatar Santhosh Kumar avatar Santhosh Veer avatar wap upa avatar  avatar  avatar David O'Trakoun avatar Entrapta Jones avatar Daniel H avatar  avatar  avatar Johann Medina avatar Rom Adams avatar

Watchers

David O'Trakoun avatar  avatar

pushtify's Issues

Gotify's notification priority is ignored

Gotify sets a priority for the notification but there seems to be no handling for this in pushtify-listener.py. The priority levels aren't the same in Gotify as in Pushover, so supporting it would likely need mapping them to ~equivalent ones.

Pushover priority levels are described here https://pushover.net/api#priority but I didn't quickly find what the priority ranges in Gotify are.

110 Operation Timed Out | Pushtify Container Runs but does not Forward Messages to Pushover?

Error
[Errno 110] Operation timed out

closed

A couple of things worth noting
-I'm using port 23606 to expose Gotify to the web via an NGINX proxy manager, Gotify it's self is only configured to use HTTP, the proxy is handling the SSL portion.
-I can post messages to my Gotify endpoint via the Nginx proxy URL and they arrive just fine.

Environment Variables
GOTIFY_TOKEN=GotifyClientToken
GOTIFY_HOST=notify.redacteddomain.xyz:23606
PUSHOVER_USERKEY=Userkey
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Any troubleshooting steps or guidance is appreciated.

[SSL: WRONG_VERSION_NUMBER] with v0.6

Hello,
was anyone able to successfully deploy v0.6?

When I deploy v0.6 I receive following output in the log:
pushtify | [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)
pushtify | ### closed ###

and the container continues rebooting (loop).

v0.5 works flawlessly ... so this is the one I am currently using. Any idea how to get around the SSL issue in v0.6?

Thanks,
CoolWolf69

SSL: WRONG_VERSION_NUMBER

I've installed pushtify with this :

  services:
    pushtify:
      image: ghcr.io/sebw/pushtify:latest
      container_name: pushtify
      environment:
        - GOTIFY_TOKEN=Ai_XXXXXXXX_
        - GOTIFY_HOST=192.168.2.221:8079
        - PUSHOVER_USERKEY=uzXXXXXXXh4
      restart: unless-stopped

The build goes well then in the container logs I got this message :

[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)
### closed ###

Do we need to use the ssl connection to Gotify ? Because I didn't enable it in Gotify.

Thanks

Docker image build errors

I can't seem to build this docker image, mostly due to this ntfy dependency ruamel.yaml.clib>=0.2.7. I get the following error:

3.954 Collecting ruamel.yaml.clib>=0.2.7
3.970   Downloading ruamel.yaml.clib-0.2.8.tar.gz (213 kB)
4.064   Installing build dependencies: started
7.163   Installing build dependencies: finished with status 'done'
7.172   Getting requirements to build wheel: started
7.460   Getting requirements to build wheel: finished with status 'done'
7.463     Preparing wheel metadata: started
7.758     Preparing wheel metadata: finished with status 'done'
7.765 Building wheels for collected packages: ruamel.yaml.clib
7.768   Building wheel for ruamel.yaml.clib (PEP 517): started
8.090   Building wheel for ruamel.yaml.clib (PEP 517): finished with status 'error'
8.091   ERROR: Command errored out with exit status 1:
8.091    command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp44lwpm7o
8.091        cwd: /tmp/pip-install-bmn24p49/ruamel-yaml-clib_b2798efff4964b30a779b2d269943c59
8.091   Complete output (16 lines):
8.091   running bdist_wheel
8.091   running build
8.091   running build_py
8.091   creating build
8.091   creating build/lib.linux-x86_64-cpython-39
8.091   creating build/lib.linux-x86_64-cpython-39/ruamel
8.091   creating build/lib.linux-x86_64-cpython-39/ruamel/yaml
8.091   creating build/lib.linux-x86_64-cpython-39/ruamel/yaml/clib
8.091   copying ./setup.py -> build/lib.linux-x86_64-cpython-39/ruamel/yaml/clib
8.091   copying ./__init__.py -> build/lib.linux-x86_64-cpython-39/ruamel/yaml/clib
8.091   copying ./LICENSE -> build/lib.linux-x86_64-cpython-39/ruamel/yaml/clib
8.091   running build_ext
8.091   building '_ruamel_yaml' extension
8.091   creating build/temp.linux-x86_64-cpython-39
8.091   gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.9 -c _ruamel_yaml.c -o build/temp.linux-x86_64-cpython-39/_ruamel_yaml.o
8.091   error: command 'gcc' failed: No such file or directory
8.091   ----------------------------------------
8.091   ERROR: Failed building wheel for ruamel.yaml.clib
8.092 Failed to build ruamel.yaml.clib
8.092 ERROR: Could not build wheels for ruamel.yaml.clib which use PEP 517 and cannot be installed directly
------
Dockerfile:2
--------------------
   1 |     FROM alpine:3.15
   2 | >>> RUN apk add --no-cache py3-pip && pip3 install ntfy && pip3 install websocket-client && rm -fr /var/cache/*
   3 |     ARG GOTIFY_TOKEN=xyz
   4 |     ARG GOTIFY_HOST=gotify.example.org
--------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.