Open AntoVie opened 3 weeks ago
Secure websocket is hard coded in the python code.
Replace wss:// with ws:// and rebuild the container image and you should be fine!
For convenience, a working Dockerfile
:
FROM python:3.10.7-alpine3.16
RUN pip install ntfy && \
pip install websocket-client && \
rm -rf /var/cache/*
ENV GOTIFY_TOKEN=xyz
ENV GOTIFY_HOST=ws://gotify.example.org
ENV PUSHOVER_USERKEY=abcdefghijklmnopqrstuvwxyz
COPY pushtify-listener.py /usr/local/bin
ENTRYPOINT ["python3","/usr/local/bin/pushtify-listener.py"]
Modified last block of pushtify-listener.py
:
if __name__ == "__main__":
wsapp = websocket.WebSocketApp(str(gotify_host) + "/stream", header={"X-Gotify-Key": str(gotify_token)},
on_open=on_open,
on_message=on_message,
on_error=on_error,
on_close=on_close)
wsapp.run_forever()
I've installed pushtify with this :
The build goes well then in the container logs I got this message :
Do we need to use the ssl connection to Gotify ? Because I didn't enable it in Gotify.
Thanks