feat(go-services): inventory-go Phase A — read-side scaffold + simple endpoints

First slice of the inventory-service port, running in parallel READ-ONLY against
the production inventory_db (never written):
- main.go/store.go: pgx pool (forced read-only), enum-DB loader extracting
  AttributeSetInfo for set-name resolution, /health, /sets/list, /characters/list.
- Dockerfile + compose service inventory-go (127.0.0.1:8772, enum JSON mounted).

Validated vs the Python service on the same DB: /characters/list 167 chars exact
counts; /sets/list 76 sets EXACT match (ids, names, counts).

Remaining (large): /search/items (40+ filters + enrich_db_item), inventory
fetch, item-processing ingestion (extract_item_properties), and the suitbuilder
solver.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-24 11:33:55 +02:00
parent 5b2db439a3
commit 253250a01d
5 changed files with 330 additions and 0 deletions

View file

@ -124,5 +124,33 @@ services:
max-size: "10m"
max-file: "3"
# Go port of inventory-service. Phase A: read side, READ-ONLY against the
# production inventory_db, validated vs the Python service. Loopback :8772.
inventory-go:
build:
context: ./go-services/inventory-go
args:
BUILD_VERSION: ${BUILD_VERSION:-dev}
image: inventory-go:local
container_name: inventory-go
ports:
- "127.0.0.1:8772:8772"
environment:
PORT: "8772"
DATABASE_URL: "postgresql://inventory_user:${INVENTORY_DB_PASSWORD}@inventory-db:5432/inventory_db"
READ_ONLY: "true"
ENUM_DB_PATH: "/enums/comprehensive_enum_database_v2.json"
LOG_LEVEL: "INFO"
volumes:
- ./inventory-service/comprehensive_enum_database_v2.json:/enums/comprehensive_enum_database_v2.json:ro
depends_on:
- inventory-db
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
dereth-go-data: