feat: initial commit
build / test (push) Successful in 9s
build / build (push) Successful in 10s
build / build-image (push) Successful in 1m4s

This commit is contained in:
2026-06-04 14:19:37 +02:00
commit cf961ab94f
28 changed files with 3036 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# syntax=docker/dockerfile:1
# --- build stage ---
FROM golang:1.26 AS build
WORKDIR /src
# Cached dependency layer.
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
# Build the static daemon.
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=linux go build \
-trimpath -ldflags="-s -w" \
-o /out/scoreboard-apid ./cmd/scoreboard-apid
# --- runtime stage ---
# distroless static includes CA certificates (needed for HTTPS to root-me.org)
# and runs as a non-root user.
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/scoreboard-apid /usr/local/bin/scoreboard-apid
EXPOSE 8080 9090
ENV HTTP_ADDR=:8080 \
GRPC_ADDR=:9090
ENTRYPOINT ["/usr/local/bin/scoreboard-apid"]