Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sanwebinfo/gtfy-listener

Forward Gotify Push Messages 🚀 to `Ntfy.sh` Push server by using websocket 🛸
https://github.com/sanwebinfo/gtfy-listener

docker docker-image gotify gotify-client gotify-plugin ntfy ntfy-sh ntfysh push-notifications python python3 websocket

Last synced: about 1 month ago
JSON representation

Forward Gotify Push Messages 🚀 to `Ntfy.sh` Push server by using websocket 🛸

Awesome Lists containing this project

README

        

# GTFY 🚀

[![docker-image](https://github.com/sanwebinfo/gtfy-listener/actions/workflows/docker.yml/badge.svg)](https://github.com/sanwebinfo/gtfy-listener/actions/workflows/docker.yml)

Gotify to `Ntfy.sh` forwarder

Forward Gotify Push Messages 🚀 to `Ntfy.sh` Push server by using websocket 🛸

using Gotify stream to Listen the Gotify Push Notifications via websocket Connection and Froward it to Ntfy Push server.

## Setup

```sh
git clone https://github.com/sanwebinfo/gtfy-listener
cd gtfy-listener

## local test
## install packages
pip install -r requirements.txt
touch .env
```

- Env File `.env`

```sh
NTFY = ""
GOTIFY_HOST = ""
GOTIFY_TOKEN = ""

## test
python3 gtfy.py

```

## Docker 🐬

Keep Running the Python Script in Docker

- Update the `.dockerfile` before build - Replace example `ENV` with yours

```sh
FROM python:3.8.10
ENV PYTHONUNBUFFERED 1
RUN pip install --upgrade pip
RUN pip3 install requests python-dotenv websocket-client
ENV GOTIFY_HOST=push.example.com
ENV GOTIFY_TOKEN=XXXXXXXXXXXX
ENV NTFY_HOST=https://ntfy.sh/gotify
COPY gtfy.py /usr/bin
CMD ["python3", "/usr/bin/gtfy.py"]
```

```sh

## Build image
docker build . -t="gtfy-listener"

## List the image
docker image ls

## Create and Test Container
docker run -d --name gtfy gtfy-listener
docker container ps
docker stop (containerID)

## Run the container forever
docker run -d --restart=always --name gtfy gtfy-listener

## List Hidden container if error exists
docker ps -a

## other commands
docker logs (containerID)
docker stop (containerID)
docker rm (containerid)
docker docker rmi (imageid)
docker image prune
docker builder prune --all -f
docker system prune --all
docker rm $(docker ps -all -q)
docker rmi $(docker image ls -q)
```

## Inspiration

Pushtify (Gotify to Pushover forwarder) -

## LICENSE

MIT