АДРЕСНЫЙ РЕЖИМ - ллм декомпоз
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,55 @@
|
||||
# eco-aip-backend
|
||||
|
||||
Minimal backend skeleton for AIP Ecology Analytics.
|
||||
|
||||
## Quick start
|
||||
1) Copy `.env.example` to `.env` and edit values if needed.
|
||||
2) Run:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
## Verify
|
||||
- API health:
|
||||
|
||||
```bash
|
||||
curl http://localhost:9501/health
|
||||
```
|
||||
|
||||
- Summary (last 24h by default):
|
||||
|
||||
```bash
|
||||
curl "http://localhost:9501/aip/waqi/summary"
|
||||
```
|
||||
|
||||
- Anomalies (last 24h by default):
|
||||
|
||||
```bash
|
||||
curl "http://localhost:9501/aip/waqi/anomalies"
|
||||
```
|
||||
|
||||
- History (daily measurements, MSK date):
|
||||
|
||||
```bash
|
||||
curl "http://localhost:9501/aip/waqi/history?date=2025-12-22"
|
||||
```
|
||||
|
||||
- DB tables:
|
||||
|
||||
```bash
|
||||
docker compose exec db psql -U aip_user -d aip_ecology -c "\dt"
|
||||
```
|
||||
|
||||
- Worker ticks:
|
||||
|
||||
```bash
|
||||
docker compose logs -f worker
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Times are stored as UTC (`timestamptz`).
|
||||
- Schema is initialized from `db/init/001_init.sql` on first DB start.
|
||||
- Worker ingests WAQI bounds data using `WAQI_TOKEN` and bbox env values.
|
||||
- Database files are stored in `db/data` (bind mount).
|
||||
- Worker detects basic anomalies (delay/stuck/spike) using observed_ts and env thresholds.
|
||||
@@ -0,0 +1,15 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app ./app
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
fastapi==0.110.0
|
||||
uvicorn==0.27.1
|
||||
psycopg2-binary==2.9.9
|
||||
httpx==0.27.0
|
||||
@@ -0,0 +1 @@
|
||||
14
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user