server production version - gunicorn

This commit is contained in:
2026-09-20 21:07:10 +02:00
parent ceb2431f8e
commit b2d268c5a0
8 changed files with 56 additions and 6 deletions
+22
View File
@@ -48,12 +48,34 @@ python seed.py
## Running
### Development
```bash
python app.py
```
The server starts on `http://localhost:5000`.
### Production
```bash
# Install dependencies (includes gunicorn)
pip install -r requirements.txt
# Run with gunicorn
gunicorn -c gunicorn.conf.py "app:create_app()"
```
Gunicorn starts on `http://0.0.0.0:8000` with `cpu * 2 + 1` workers.
#### systemd service
```bash
sudo cp yggdrasil.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now yggdrasil
```
| Route | Description |
|---|---|
| `/sensors` | Dashboard with interactive chart and data table |