Files
pizzaandcheese cd75bbf5a0 Initial implementation of reolink-controller
- Go + SQLite + HTMX web GUI for managing Reolink camera automations
- Frigate MQTT subscriber for motion, event, review, and object topics
- Automation engine with time-window filtering and auto-revert timers
- Reolink HTTP API client: floodlight, siren, PTZ, IR mode, OSD timestamp
- Camera discovery via Frigate REST API with RTSP credential parsing
- Multi-stage Docker build with docker-compose for Frigate network integration
2026-05-22 11:38:34 -05:00

35 lines
851 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.23-alpine AS builder
WORKDIR /src
# Fetch dependencies before copying source for better layer caching
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags="-s -w" \
-o /reolink-controller \
./cmd/server
# ── Runtime ───────────────────────────────────────────────────────────────────
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata
RUN addgroup -S app && adduser -S app -G app
WORKDIR /app
COPY --from=builder /reolink-controller /app/reolink-controller
# Data directory for SQLite
RUN mkdir -p /data && chown app:app /data
USER app
EXPOSE 8080
ENTRYPOINT ["/app/reolink-controller"]