release
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
21
README.md
21
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 <repo-url>
|
||||
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
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@ Flask==3.0.0
|
||||
gunicorn==21.2.0
|
||||
python-dotenv==1.0.0
|
||||
telnetlib3==2.0.4
|
||||
aiohttp
|
||||
aiohttp
|
||||
gunicorn
|
||||
Reference in New Issue
Block a user