continuous-integration/drone/push Build encountered an error
- Delete BinaryUpdate, internal/up2date, GitHub/Update structs and the xteveAutoUpdate / update.url settings (UI rows, en.json, defaults). Settings-schema migrations kept and moved to src/migrate.go. - Drop kardianos/osext dependency. - xteve.go version 0200 -> 0201 to match changelog; Drone now fails on drift. - go.mod go 1.27.1; Dockerfile and Drone golang images pinned to 1.27.1. - Fix four go vet unreachable-code warnings. - .gitignore: .gocache/, agent.md, skill.md. .dockerignore: build context no longer includes caches, ts/, tasks/ or markdown except the changelog. - Drone: publish :latest only from master; other branches publish a branch-named tag so a feature push cannot replace the deployed image. - Add tasks/improvement-plan.md and tasks/todo.md. - Regenerate src/webUI.go.
53 lines
1.3 KiB
Docker
53 lines
1.3 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM golang:1.27.1-alpine AS builder
|
|
WORKDIR /src
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN go run ./cmd/webui-gen
|
|
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
RUN XTEVE_VERSION="$(grep -m1 '^#### ' changelog-beta.md | cut -d' ' -f2 | sed 's/-beta$//')" \
|
|
&& test -n "$XTEVE_VERSION" \
|
|
&& CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
|
go build -trimpath -ldflags="-s -w -X main.Version=$XTEVE_VERSION" -o /out/xteve ./xteve.go
|
|
|
|
FROM mwader/static-ffmpeg:latest AS ffmpeg
|
|
|
|
FROM alpine:3.23
|
|
|
|
ARG XTEVE_UID=1000
|
|
ARG XTEVE_GID=1000
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata \
|
|
&& addgroup -S -g "${XTEVE_GID}" xteve \
|
|
&& adduser -S -D -H -u "${XTEVE_UID}" -G xteve xteve \
|
|
&& mkdir -p /xteve/config \
|
|
&& chown -R xteve:xteve /xteve
|
|
|
|
WORKDIR /xteve
|
|
|
|
COPY --from=builder /out/xteve /usr/local/bin/xteve
|
|
COPY --from=ffmpeg /ffmpeg /usr/local/bin/ffmpeg
|
|
COPY --from=ffmpeg /ffprobe /usr/local/bin/ffprobe
|
|
COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
|
|
|
USER xteve
|
|
|
|
EXPOSE 34400/tcp
|
|
|
|
ENV XTEVE_CONFIG=/xteve/config
|
|
ENV XTEVE_PORT=34400
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
|
CMD wget -qO- "http://127.0.0.1:${XTEVE_PORT}/lineup_status.json" > /dev/null || exit 1
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|