diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4f46ba7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:latest +RUN apk update +RUN apk add py-pip +RUN apk add --no-cache python3-dev net-snmp-tools py3-flask +WORKDIR /app +COPY . /app +CMD ["python3", "app.py"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..98e8c3e --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Uptime-Kuma SMTP bridge + +## Docker + +Login: `docker login` +Build: `docker build -t uptimekuma-snmp-bridge .` +Tag: `docker tag uptimekuma-snmp-bridge elpatron68/uptimekuma-snmp-bridge` +Push: `docker image push elpatron68/uptimekuma-snmp-bridge` diff --git a/app.py b/app.py index 7cdd115..6363ff8 100644 --- a/app.py +++ b/app.py @@ -49,4 +49,4 @@ def startsnmpwalk(ip, oid, expectedtext): if __name__ == '__main__': - app.run(debug=True, host='192.168.177.48') \ No newline at end of file + app.run(host="0.0.0.0", port=8684) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..047e950 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask==3.0.0