14cbee8e25
Dashboard: add an editable 'solo-error penalty ×' (default 1.5) — a false positive only one model made (a unique wrong claim, derived from reporter count) multiplies its FP penalty, mirroring the solo-find bonus. Client-side; store stays point-free. Deploy: speed up the healthcheck (image HEALTHCHECK + compose example: interval 30s->5s, start_period 10s, start_interval 1s). Traefik gates routing on the Docker health status, so the old 30s-to-first-probe meant ~30s of 502s after a restart; the daemon binds the port in ms, so it now goes healthy in ~1s. Data is on the volume; only fire-and-forget emits in the ~1s window are at risk. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 lines
1.0 KiB
Docker
25 lines
1.0 KiB
Docker
# gadfly-reports daemon image. modernc.org/sqlite is pure Go, so the binary is
|
|
# CGO-free and the final image needs no libc / no C toolchain at build time.
|
|
FROM golang:1.26 AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/gadfly-reports .
|
|
|
|
FROM alpine:3.20
|
|
RUN adduser -D -u 10001 app && mkdir -p /data && chown app /data
|
|
COPY --from=build /out/gadfly-reports /usr/local/bin/gadfly-reports
|
|
USER app
|
|
ENV GADFLY_REPORTS_ADDR=:8090 \
|
|
GADFLY_REPORTS_DB=/data/gadfly-reports.db
|
|
EXPOSE 8090
|
|
VOLUME ["/data"]
|
|
# Fast probe so an orchestrator (e.g. Traefik) resumes routing within a few seconds
|
|
# of a (re)start — the daemon binds the port in milliseconds. First probe at
|
|
# --interval (5s); --start-period keeps early failures from flapping the status.
|
|
HEALTHCHECK --interval=5s --timeout=3s --start-period=10s --retries=3 \
|
|
CMD wget -q -O - http://localhost:8090/healthz || exit 1
|
|
ENTRYPOINT ["/usr/local/bin/gadfly-reports"]
|
|
CMD ["serve"]
|