- ENABLE_SELF_OBSERVE env var (default false) gates self-observe - Fix UA condition: empty UA no longer triggers logging - Add per-IP dedup (5min) to prevent 1M+ row storms - Remove _cache=null from selfObserve (was busting cache on every hit) - Add 90-day row pruning on startup + every 6h - Add enrichCache TTL cleanup every 5min to prevent unbounded memory growth Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
537 B
YAML
25 lines
537 B
YAML
services:
|
|
bot-api:
|
|
build: .
|
|
container_name: bot-api
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3091:3091"
|
|
volumes:
|
|
- bot-data:/data
|
|
environment:
|
|
- PORT=3091
|
|
- DB_PATH=/data/bots.db
|
|
- NODE_ENV=production
|
|
- API_TOKEN=${API_TOKEN:-change-me-to-a-long-random-string}
|
|
- ENABLE_SELF_OBSERVE=false
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3091/api/v1/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
bot-data:
|
|
driver: local
|