From ca3cc57773acb6747b3d066e0572c2e4e54fe022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Fri, 2 Jan 2026 22:57:07 +0100 Subject: [PATCH] release --- .env.example | 6 ++++-- Dockerfile | 2 +- README.md | 21 ++++++++------------- requirements.txt | 3 ++- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.env.example b/.env.example index f240af1..91cf018 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1,13 @@ # .env.example - Template for environment variables # Copy to .env and customize +SECRET_KEY=change-me + # GPON Device GPON_HOST=192.168.100.1 GPON_PORT=23 -GPON_USERNAME=admin -GPON_PASSWORD=admin +GPON_USERNAME=leox +GPON_PASSWORD=leolabs_7 # Web Server LISTEN_HOST=0.0.0.0 diff --git a/Dockerfile b/Dockerfile index 43c4618..c08c547 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,4 +34,4 @@ ENV LISTEN_PORT=8080 EXPOSE $LISTEN_PORT # Run app -CMD ["python", "app.py"] +CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:${LISTEN_PORT} --workers 1 --threads 2 --access-logfile - --error-logfile - app:app"] diff --git a/README.md b/README.md index 8f256d1..88aa232 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,15 @@ Real-time monitoring for ONT/ONU GPON devices via OMCI telnet and web scraping with RRD-based historical graphs. +Work with LXT-010 S-H / H-D. +Tested on GPON stick SFP+ LXT-010S-H + ## Quick Start ### 1. Clone or download the project ```bash -git clone -cd gpon-monitor +https://gitea.linuxiarz.pl/gru/leox-gpon-monitoring +cd leox-gpon-monitoring ``` ### 2. Configure .env file @@ -19,8 +22,8 @@ nano .env Edit basic parameters: ```env GPON_HOST=192.168.100.1 -GPON_USERNAME=admin -GPON_PASSWORD=admin +GPON_USERNAME=leox +GPON_PASSWORD=leolabs_7 EXTERNAL_PORT=8080 ``` @@ -99,14 +102,6 @@ TX_POWER_MAX=4.0 TEMPERATURE_MAX=85.0 ``` -## Docker Details - -- Base image: Python 3.11 Alpine -- Volumes: `./data/rrd:/data/rrd` -- Network: Bridge -- Healthcheck: `/api/current` endpoint -- Restart policy: unless-stopped - ## API Endpoints ```bash @@ -161,7 +156,7 @@ docker-compose up -d - Docker - Docker Compose -- ONT device with telnet access (port 23) +- LEOX device with telnet access (port 23) ## Development diff --git a/requirements.txt b/requirements.txt index c9ef510..c09557b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ Flask==3.0.0 gunicorn==21.2.0 python-dotenv==1.0.0 telnetlib3==2.0.4 -aiohttp \ No newline at end of file +aiohttp +gunicorn \ No newline at end of file