45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
# BuyingAgent
|
|
|
|
Backend für einen generischen Buying-/Deal-Agenten. Der erste fachliche Schnitt ist in `.specs/buying-agent-v0.1-spec.md` beschrieben.
|
|
|
|
Entwicklung auf `develop`. Push nach `develop` baut die Dev-Umgebung auf dem Raspberry Pi. Ein Merge-Commit nach `main` deployt Production. Details: `docs/DEPLOYMENT.md`.
|
|
|
|
## Stack
|
|
|
|
Python 3.13, FastAPI, Pydantic 2, SQLAlchemy 2, Alembic, PostgreSQL 17, pytest, Docker Compose. Build-Tool: [uv](https://docs.astral.sh/uv/) 0.10.11.
|
|
|
|
## Lokal starten
|
|
|
|
```powershell
|
|
Copy-Item .env.example .env
|
|
docker compose up --build -d
|
|
```
|
|
|
|
```sh
|
|
cp .env.example .env
|
|
docker compose up --build -d
|
|
```
|
|
|
|
API: `http://127.0.0.1:8000`
|
|
Live: `GET /health/live`
|
|
Ready: `GET /health/ready` (PostgreSQL erreichbar und Alembic auf Head)
|
|
|
|
## Tests
|
|
|
|
Lokal, isolierter Stack (tmpfs, kein Dev-/Prod-Volume):
|
|
|
|
```sh
|
|
docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from api
|
|
```
|
|
|
|
Auf dem Server nach Dev-Deploy (Gitea `test.yml`, analog Kanshō): pytest gegen `buyingagent_test` auf dem Dev-Postgres plus read-only Smoke gegen `http://192.168.2.49:8095/health/ready`.
|
|
|
|
## Server
|
|
|
|
| Umgebung | Branch | Verzeichnis | API |
|
|
|---|---|---|---|
|
|
| Development | `develop` | `~/docker/buyingagent-dev` | `http://192.168.2.49:8095` |
|
|
| Production | `main` | `~/docker/buyingagent` | `http://192.168.2.49:8006` |
|
|
|
|
Repo: `http://192.168.2.144:3000/Lars/BuyingAgent.git`
|