add: Docker image and compose for containerized deploy

Multi-stage build (cgo for the SQLite logger) on debian-slim with ffmpeg,
opus-tools, and ca-certificates bundled. Compose mounts ./data/config.yaml
and ./data/media; SIGTERM cancels in-flight encodes cleanly.
This commit is contained in:
Esa Kataja
2026-06-21 17:08:32 +03:00
parent 3170f3bbb5
commit ef52d7856c
3 changed files with 41 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# Build needs cgo (the logger uses github.com/mattn/go-sqlite3), so no scratch/static image.
FROM golang:1.26-bookworm AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 go build -ldflags="-s -w" -o /videnc-vibe ./cmd/videnc/
FROM debian:bookworm-slim
# ffmpeg gives ffmpeg+ffprobe; opus-tools gives opusenc; ca-certificates for OMDb/TVmaze HTTPS.
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg opus-tools ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /videnc-vibe /usr/local/bin/videnc-vibe
# logs.db + log files land in the working dir — make it the mounted /data so they persist.
WORKDIR /data
ENTRYPOINT ["videnc-vibe", "-c", "/config/config.yaml"]