feat: API skeleton, SSE, staffing and tests
This commit is contained in:
1 parent
907164f972
commit
f284969a4b
14 files changed
+1355
-54
No files matched your search
+29
@@ -0,0 +1,29 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:1.27-alpine AS build
|
||||
WORKDIR /src
|
||||
|
||||
# Dependencies are only the standard library today; the explicit copy keeps
|
||||
# the module cache layer stable when that changes.
|
||||
COPY go.mod ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build \
|
||||
-trimpath -ldflags="-s -w" \
|
||||
-o /out/api ./cmd/api
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /out/api /app/api
|
||||
# Baked fallback data lives in the image; there is no runtime data fetch.
|
||||
COPY --from=build /src/testdata/data /app/data
|
||||
|
||||
ENV DATA_DIR=/app/data \
|
||||
PORT=8080
|
||||
|
||||
EXPOSE 8080
|
||||
USER nonroot:nonroot
|
||||
|
||||
ENTRYPOINT ["/app/api"]
|
||||
Reference in new issue
Block a user