Replaces the FFmpeg -> MediaMTX -> HLS pipeline with a raw MPEG-TS fan-out architecture: - Go stream.Hub holds ONE upstream connection per active channel and broadcasts the raw TS bytes to all connected browsers via /ts. The IPTV provider only ever sees one IP (the server), no matter how many viewers are watching (shared single-channel model). - Frontend uses mpegts.js to play the raw TS in-browser via MSE, fixing HEVC/H.265 4K streams that HLS could not package. - Dropped FFmpeg, MediaMTX, RTMP/RTSP, HLS proxy, playback/ingest modes, the OBS source toggle, and FFmpeg health stats. - UI look preserved (fullscreen video, collapsible sidebar, status bar, upstream-down banner, hourly playlist auto-refresh). Tradeoff: loses iOS Safari (no MSE/mpegts.js); fixes desktop/Android playback of both H.264 and H.265.
31 lines
692 B
Docker
31 lines
692 B
Docker
# Stage 1: Build Go backend
|
|
FROM golang:1.23-alpine AS backend
|
|
WORKDIR /src
|
|
COPY backend/ .
|
|
RUN go build -o /out/tuner .
|
|
|
|
# Stage 2: Build React frontend
|
|
FROM oven/bun:latest AS frontend
|
|
WORKDIR /src
|
|
COPY frontend/ .
|
|
RUN bun install && bun run build
|
|
|
|
# Stage 3: Runtime
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
WORKDIR /app
|
|
COPY --from=backend /out/tuner /app/tuner
|
|
COPY --from=frontend /src/dist /app/frontend/dist
|
|
|
|
ENV RESTREAMER_PORT=8080
|
|
ENV PLAYLIST_PATH=/data/playlist.m3u
|
|
ENV PLAYLIST_URL=https://pia.cx/m3u/630xhAmY/smp424GL
|
|
ENV PLAYLIST_USE_LOCAL=false
|
|
ENV PLAYLIST_AUTO_REFRESH_INTERVAL=1h
|
|
ENV FRONTEND_DIR=/app/frontend/dist
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/app/tuner"]
|