- Added MonitorPort field to Config struct (TODO 5.1) - Config loads from MONITOR_PORT or HF_MONITOR_PORT env vars - Added to Dockerfile env defaults - Updated config.example.json - Merge function handles monitorPort from file config Prepares Monitor for local plugin communication bridge (TODO 5.1, 5.2)
22 lines
646 B
Docker
22 lines
646 B
Docker
FROM golang:1.22-alpine AS builder
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/harborforge-monitor ./cmd/harborforge-monitor
|
|
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
WORKDIR /app
|
|
COPY --from=builder /out/harborforge-monitor /usr/local/bin/harborforge-monitor
|
|
|
|
ENV HF_MONITER_BACKEND_URL=https://monitor.hangman-lab.top \
|
|
HF_MONITER_IDENTIFIER= \
|
|
HF_MONITER_API_KEY= \
|
|
HF_MONITER_REPORT_INTERVAL=30 \
|
|
HF_MONITER_LOG_LEVEL=info \
|
|
HF_MONITER_ROOTFS=/host \
|
|
MONITOR_PORT=0
|
|
|
|
ENTRYPOINT ["/usr/local/bin/harborforge-monitor"]
|