continuous-integration/drone/push Build encountered an error
- html/embed.go embeds html/ (pages, css, img, js, video); src/assets.go
serves it, with os.DirFS("html") under -dev. Static assets get an ETag
and Cache-Control: no-cache; HTML pages are still templated (only the
login error message is substituted now).
- Delete the generated src/webUI.go (783 KB base64), src/html-build.go and
cmd/webui-gen; Dockerfile no longer runs a generator.
- Language layer removed: 254 {{.x}} placeholders inlined as English
strings in ts/*.ts and the two auth pages; html/lang/en.json, the
LanguageUI struct and the 'language' setting are gone.
- ts/tsconfig.json + package.json pin typescript 5.9.3; the seven sources
compile (ES2020, global scripts) into one committed html/js/app.js.
Ten unreferenced legacy scripts under html/js/ deleted; all pages load
js/app.js.
- Fix the six type errors that blocked a clean compile, including a real
bug: a missing semicolon in the search shortcut handler made the code
call the result of preventDefault(), so the shortcut threw instead of
focusing the search box.
- /healthz liveness endpoint; Dockerfile healthcheck and README use it.
- Drone: go vet, and a webui-check step that rebuilds the bundle and fails
if the committed app.js is stale.
- README-DEV.md documents build, UI toolchain, -dev, versioning, CI.
51 lines
1.3 KiB
Docker
51 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 . .
|
|
|
|
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}/healthz" > /dev/null || exit 1
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|