Files
linearvoid/backend/playout/Dockerfile
T
zwitschi 2b091adce8
CI / test (push) Failing after 2m24s
CI / docker (push) Skipped
CI / release (push) Skipped
move demo-data to its own folder
2026-08-04 11:40:22 +02:00

39 lines
961 B
Docker

FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY src/ ./src/
# Initialize Go module if not present
RUN go mod init playout || true
RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux go build -o /playlist-manager ./src/playlist.go
FROM alpine:3.20
# Install FFmpeg, curl for health checks, and basic tools
RUN apk add --no-cache \
ffmpeg \
curl \
bash
WORKDIR /app
COPY --from=builder /playlist-manager /app/playlist-manager
COPY start-playout.sh /app/
COPY *.sh /app/
RUN chmod +x /app/*.sh /app/playlist-manager
# Create directories for playlist, media, and HLS output
RUN mkdir -p /app/playlist /app/media /app/hls
# Copy demo media and playlist for out-of-the-box playout
COPY demo-data/media/ /app/media/
COPY demo-data/playlist/playlist.txt /app/playlist/playlist.txt
# Expose HLS directory (will be served by nginx)
VOLUME ["/app/hls"]
# Default command runs the playout loop (which calls the Go validator)
CMD ["./start-playout.sh"]