Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 🛸
- Host: GitHub
- URL: https://github.com/sanwebinfo/gtfy-listener
- Owner: sanwebinfo
- License: mit
- Created: 2023-09-22T13:01:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-11T12:55:36.000Z (10 months ago)
- Last Synced: 2024-11-06T02:37:54.260Z (2 months ago)
- Topics: docker, docker-image, gotify, gotify-client, gotify-plugin, ntfy, ntfy-sh, ntfysh, push-notifications, python, python3, websocket
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 8
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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