abc81e60c8
Single Go binary with embedded Bootstrap 3 + jQuery UI, querying logs.raw over the ClickHouse HTTP interface as the readonly logreader user. Runs behind oauth2-proxy; the app does no auth itself. Server-side enforced time bounds (15m default, 72h max), parameterized queries, raw-SQL WHERE fragment wrapped with enforced bounds and LIMIT, tail polling with a clamped cursor, facets, healthz. Woodpecker build/test plus tag-driven image push to artifactapi docker-internal.
19 lines
413 B
Docker
19 lines
413 B
Docker
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
COPY go.mod ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION}" -o logviewer .
|
|
|
|
# distroless static ships ca-certificates and runs as an unprivileged user.
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
|
|
COPY --from=builder /build/logviewer /usr/local/bin/logviewer
|
|
|
|
ENTRYPOINT ["logviewer"]
|