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>
12 lines
366 B
Docker
12 lines
366 B
Docker
FROM golang:1.25-bookworm AS build
|
|
WORKDIR /src
|
|
COPY . .
|
|
RUN go mod tidy
|
|
ARG BUILD_VERSION=dev
|
|
RUN CGO_ENABLED=0 GOOS=linux go build \
|
|
-trimpath -ldflags "-s -w -X main.buildVersion=${BUILD_VERSION}" -o /out/inventory-go .
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY --from=build /out/inventory-go /inventory-go
|
|
EXPOSE 8772
|
|
ENTRYPOINT ["/inventory-go"]
|