Adds the rest of the read-side endpoints to the Go tracker, all parity-checked
against the live Python service:
- DB reads: /stats/{c}, /portals, /spawns/heatmap, /server-health,
/character-stats/{c} (stats_data JSONB merged to top level),
/combat-stats[/{c}], /inventories, /inventory/{c}/search.
- 5-minute totals cache + /total-rares, /total-kills.
- Ingest-only state returned as Python's empty/default shapes (/quest-status,
/vital-sharing/peers, /equipment-cantrip-state/{c}); /issues (flat file),
/me (401 until cookie verification lands).
- Streaming reverse proxy to inventory-service (/inventory/{c},
/inventory-characters, /search/*, /sets/list, /inv/{path...} incl. the SSE
suitbuilder stream).
- compare/compare_endpoints.py: structural parity for all read endpoints +
exact-match check for /character-stats and /combat-stats on OFFLINE chars
(online chars legitimately differ — Python serves a richer live overlay that
Phase-1 Go lacks until ingest).
Verified live: 14/14 endpoints structural-match, 8/8 rich offline chars
exact-match on /character-stats.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
# Compose OVERRIDE that adds the Go services alongside the live Python stack.
|
|
# It only ADDS containers; it never modifies the tracked docker-compose.yml or
|
|
# any running Python service.
|
|
#
|
|
# Invoke from the repo root so the Compose project name resolves to
|
|
# "mosswartoverlord" (same as the live stack) and the new container joins the
|
|
# existing default network — letting it reach the `db` service by name:
|
|
#
|
|
# cd /home/erik/MosswartOverlord
|
|
# export BUILD_VERSION="$(date -u +%Y.%-m.%-d.%H%M)-$(git rev-parse --short HEAD)"
|
|
# docker compose -f docker-compose.yml -f go-services/docker-compose.go.yml \
|
|
# build dereth-tracker-go
|
|
# docker compose -f docker-compose.yml -f go-services/docker-compose.go.yml \
|
|
# up -d --no-deps dereth-tracker-go
|
|
#
|
|
# --no-deps keeps Compose from touching the already-running `db` (and anything
|
|
# else). The service is loopback-bound (127.0.0.1:8770); external reach is only
|
|
# ever via the host nginx `location /go/` block (added separately).
|
|
services:
|
|
dereth-tracker-go:
|
|
build:
|
|
context: ./go-services/tracker-go
|
|
args:
|
|
BUILD_VERSION: ${BUILD_VERSION:-dev}
|
|
container_name: dereth-tracker-go
|
|
ports:
|
|
- "127.0.0.1:8770:8770"
|
|
environment:
|
|
PORT: "8770"
|
|
# Read-only use of the same dereth TimescaleDB the Python tracker writes.
|
|
DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/dereth"
|
|
INVENTORY_SERVICE_URL: "http://inventory-service:8000"
|
|
LOG_LEVEL: "INFO"
|
|
depends_on:
|
|
- db
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|