009 add docker compose

This commit is contained in:
Раис Юсупалиев
2026-03-08 15:18:46 +03:00
parent 34d7a4c336
commit df2f132c05
7 changed files with 178 additions and 6 deletions
+42
View File
@@ -0,0 +1,42 @@
# Local Infrastructure Stack
## Services
- `app`: FastAPI service (`uvicorn app.main:app`) built from root `Dockerfile`
- `redis`: price cache backend
- `signoz`: observability backend (UI + OTLP receiver)
## Environment wiring
### `app` service
- `G2S_CONFIG_FILE=/app/config.yaml`
- `G2S_REPOSITORY__REDIS_DSN=redis://redis:6379/0`
- `G2S_OBSERVABILITY__OTLP_ENDPOINT=http://signoz:4317`
- `PYTHONUNBUFFERED=1`
### `signoz` service
- `G2S_ALERTS__TELEGRAM_BOT_TOKEN` (optional for Telegram alerts)
- `G2S_ALERTS__TELEGRAM_CHAT_ID` (optional for Telegram alerts)
## Startup instructions
1. Validate compose syntax:
- `docker compose config`
2. Start dependencies:
- `docker compose up -d redis signoz`
3. Verify running containers:
- `docker compose ps`
4. Start application:
- `docker compose up -d app`
5. Stop local stack:
- `docker compose down`
## Smoke command sequence
```bash
docker compose config
docker compose up -d redis signoz
docker compose ps
```