# fluxrec serve container (rss + status on :8080, state in /data). # # build: docker build -f Containerfile -t fluxrec . # run: docker run -d --name fluxrec \ # --env-file /srv/fluxrec/env \ # -v /srv/fluxrec:/data \ # -p 127.0.0.1:8080:8080 \ # fluxrec # # The env file holds MINIFLUX_URL and MINIFLUX_TOKEN (plus optional TZ — # refresh times are computed in it; default UTC, tzdata is installed). The # env file lives on the server only, never in this repo. /data holds # model.json (scp'd by `just deploy`), cursor.json and runs.jsonl. FROM golang:1.25-alpine AS build WORKDIR /src COPY . . RUN CGO_ENABLED=0 go build -trimpath -o /out/fluxrec . FROM alpine:3.21 # uid 1000 = the first local user on a typical host, so a bind-mounted # /data and files scp'd into it have one owner on both sides. RUN apk add --no-cache tzdata \ && adduser -D -u 1000 fluxrec \ && mkdir -p /data && chown fluxrec:fluxrec /data USER fluxrec COPY --from=build /out/fluxrec /usr/local/bin/fluxrec EXPOSE 8080 ENTRYPOINT ["fluxrec", "serve", \ "--model", "/data/model.json", \ "--cursor", "/data/cursor.json", \ "--runs", "/data/runs.jsonl"] # Override refresh times / rec feed ID via extra args after the image name, e.g.: # docker run ... fluxrec --refresh-at "06:00,12:00,18:00" --rec-feed-id 123