feat: add demo-app api service

실험·앱 계층 설계서 3.1의 demo-app api(컨테이너 계층). /healthz, /readyz(DB ping +
legacy /healthz), /api/orders GET/POST(app.orders), /api/price/{item}(legacy-api via ILB,
LEGACY_TIMEOUT 기본 2s), /metrics(demo_http_*). OTLP 트레이스는 OTEL_EXPORTER_OTLP_ENDPOINT
설정 시 전송(otelhttp). 이미지는 공개 Artifact Registry selfheal-public(노드 익명 pull).
This commit is contained in:
seon committed 2026-09-24 01:32:06 +09:00
1 parent 7186ef0c49
commit 8f5378b6ea
5 files changed
+397 -1

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
# demo-app api (Kubernetes layer of the self-healing lab). Built with Cloud Build into the public Artifact Registry repo.
FROM golang:1.27.1-alpine AS build
WORKDIR /src
ENV CGO_ENABLED=0 GOFLAGS=-mod=mod
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -trimpath -ldflags="-s -w" -o /out/demo-api .
FROM alpine:3.22
RUN apk add --no-cache ca-certificates && adduser -D -u 10001 app
USER 10001
COPY --from=build /out/demo-api /usr/local/bin/demo-api
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/demo-api"]