Each disk stores .jukebox/profile.json with copy parameters (dest
folder, overwrite mode, file select, reserve space, auto-copy) and
optional transcoding limits for the target player (codec, resolution,
bitrate, FPS, audio channels, output format).
On copy, video files are probed with ffprobe; if they exceed the
profile limits they are transcoded via ffmpeg (-threads 0 for full
CPU usage), otherwise copied as-is. Scale filter never upscales.
New: internal/disk/profile.go, internal/transcoder/{detect,transcoder}.go
API: GET/PUT /api/disks/profile?mount_path=
UI: disk profile panel in dashboard for known disks
Dockerfile: adds ffmpeg to the runtime image
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
874 B
Docker
32 lines
874 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
ARG VERSION=dev
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
COPY go.mod go.sum ./
|
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=cache,target=/root/.cache/go-build \
|
|
go mod download
|
|
|
|
COPY . .
|
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=cache,target=/root/.cache/go-build \
|
|
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -trimpath -ldflags="-s -w -X main.Version=${VERSION}" \
|
|
-o /out/jukebox ./cmd/jukebox
|
|
|
|
FROM alpine:3.19
|
|
|
|
RUN apk add --no-cache tzdata ca-certificates rsync ffmpeg
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /out/jukebox .
|
|
|
|
VOLUME ["/media", "/mnt/usb", "/config"]
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/app/jukebox"]
|
|
CMD ["--config", "/config/config.json", "--addr", ":8080", "--media", "/media", "--mount", "/mnt/usb"]
|