Files
statuspage/Dockerfile
T
aziis98 95eab7f584 statuspage: monitor lab/home machines with a small status page
Go backend probes machines over ICMP/TCP, runs a configurable script over
SSH for checks and numeric metrics, and keeps history in SQLite. Preact +
Vite frontend shows machine groups, per-machine metric plots, and
cross-machine metric aggregates.

- server/: status, history, metrics, aggregate, refresh APIs
- src/: Preact + Vite frontend
- Single YAML config; documented example in example.config.yaml
- SQLite data stored under data.volume/ (bind-mounted in Docker)
- Multi-stage alpine Dockerfile with BuildKit cache mounts
- LICENSE: AGPL-3.0
2026-08-01 02:27:47 +02:00

31 lines
909 B
Docker

# syntax=docker/dockerfile:1.7
FROM oven/bun:1-alpine AS frontend
WORKDIR /ui
COPY package.json bun.lock ./
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile
COPY . .
RUN bun run build
FROM golang:1.26-alpine AS backend
RUN apk add --no-cache build-base
WORKDIR /src
RUN --mount=type=bind,source=.,target=/src \
--mount=type=cache,target=/go/pkg/mod \
go mod download
RUN --mount=type=bind,source=.,target=/src \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=1 go build -o /out/statuspage ./server
FROM alpine:3.22
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=backend /out/statuspage /app/statuspage
COPY --from=frontend /ui/dist /app/dist
VOLUME /app/data.volume
EXPOSE 5000
ENTRYPOINT ["/app/statuspage"]
CMD ["-c", "/app/config.local.yaml", "--addr", ":5000"]