New version with grafana
This commit is contained in:
parent
f86ad9a542
commit
b2f649a489
6 changed files with 201 additions and 21 deletions
30
README.md
30
README.md
|
|
@ -33,15 +33,18 @@ This project provides:
|
|||
|
||||
## Requirements
|
||||
|
||||
- Python 3.9 or newer
|
||||
- pip
|
||||
- (Optional) virtual environment tool (venv)
|
||||
- Python 3.9 or newer (only if running without Docker)
|
||||
- pip (only if running without Docker)
|
||||
- Docker & Docker Compose (recommended)
|
||||
|
||||
Python packages:
|
||||
Python packages (if using local virtualenv):
|
||||
|
||||
- fastapi
|
||||
- uvicorn
|
||||
- pydantic
|
||||
- databases
|
||||
- asyncpg
|
||||
- sqlalchemy
|
||||
- websockets # required for sample data generator
|
||||
|
||||
## Installation
|
||||
|
|
@ -74,6 +77,22 @@ Start the server using Uvicorn:
|
|||
```bash
|
||||
uvicorn main:app --reload --host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
# Grafana Dashboard UI
|
||||
```nginx
|
||||
location /grafana/ {
|
||||
proxy_pass http://127.0.0.1:3000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# WebSocket support (for live panels)
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
```
|
||||
|
||||
## NGINX Proxy Configuration
|
||||
|
||||
|
|
@ -94,7 +113,8 @@ location /api/ {
|
|||
```
|
||||
Then the browser client (static/script.js) will fetch `/api/live/` and `/api/trails/` to reach this new server.
|
||||
|
||||
- Live Map: `http://localhost:8000/` (or `http://<your-domain>/api/` if behind a prefix)
|
||||
- Live Map: `http://localhost:8000/` (or `http://<your-domain>/api/` if behind a prefix)
|
||||
- Grafana UI: `http://localhost:3000/grafana/` (or `http://<your-domain>/grafana/` if proxied under that path)
|
||||
|
||||
### Frontend Configuration
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue