Fix review findings F1-F3 for Docker context, health check and version
Independent review Approved — 0 high findings (#5)

F1: exclude generated internal/frontend/dist from the Docker build context.
F2: derive the health check host from MEALQUEST_HTTP_ADDR, mapping wildcard
hosts and localhost to 127.0.0.1 and keeping IPv6 brackets.
F3: compute the -dirty suffix ignoring the generated embed output, so a
rebuild of a clean checkout is not stamped dirty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 23:02:31 -04:00
co-authored by Claude Opus 5.5
parent 2e5724d150
commit 9b66ba0ff5
3 changed files with 12 additions and 4 deletions
+4 -1
View File
@@ -7,7 +7,10 @@
# make docker Build the container image from ./Dockerfile.
FRONTEND_DIST := internal/frontend/dist
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
# Dirty means a tracked change outside the generated embed output, which
# `make embed` rewrites; plain `--dirty` would flag every rebuild.
GIT_DIRTY := $(shell git status --porcelain --untracked-files=no -- . ':(exclude)$(FRONTEND_DIST)' 2>/dev/null)
VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo dev)$(if $(GIT_DIRTY),-dirty)
IMAGE ?= mealquest:$(VERSION)
LDFLAGS := -s -w -X main.version=$(VERSION)