OpenAPI 3.0 contract (api/openapi.yaml) with oapi-codegen generated server, client and models; preload-api (Jellyfin lookup, SQLite queue, bearer roles) runs at home, preload-agent runs on the VPS and fills the rclone cache. mise manages Go 1.27.3 and oapi-codegen 2.8.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GUebqghNwNssAZuWTxUq1y
16 lines
458 B
Docker
16 lines
458 B
Docker
# Build: podman build -t localhost/media-preload-api:latest -f Containerfile .
|
|
FROM docker.io/library/golang:1.27 AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /out/preload-api ./cmd/preload-api
|
|
|
|
FROM scratch
|
|
COPY --from=build /out/preload-api /preload-api
|
|
USER 65534:65534
|
|
EXPOSE 8125
|
|
VOLUME ["/data"]
|
|
ENTRYPOINT ["/preload-api"]
|