chore: add Dockerfile and Forgejo CI publish workflow: Dockerfile

This commit is contained in:
Zac Gaetano 2026-05-06 16:17:02 -04:00
parent 2f9fd42a91
commit 8e9e4a7e59

37
Dockerfile Normal file
View file

@ -0,0 +1,37 @@
# syntax=docker/dockerfile:1
# Builds the Wild Dragon Restreamer UI:
# 1. Clone upstream datarhei/restreamer-ui at UPSTREAM_TAG
# 2. Apply overlay (branding + WebRTC components)
# 3. yarn build
# 4. Serve with Caddy
ARG UPSTREAM_TAG=v1.14.0
ARG NODE_VERSION=20
# ── Build ─────────────────────────────────────────────────────────────────────
FROM node:${NODE_VERSION}-alpine AS ui-builder
ARG UPSTREAM_TAG
RUN apk add --no-cache git
RUN git clone --depth 1 --branch ${UPSTREAM_TAG} \
https://github.com/datarhei/restreamer-ui.git /ui
WORKDIR /ui
RUN yarn install --frozen-lockfile
COPY overlay/ /overlay/
COPY apply-overlay.sh /apply-overlay.sh
RUN sh /apply-overlay.sh
ENV PUBLIC_URL=./
RUN yarn build
# ── Serve ─────────────────────────────────────────────────────────────────────
FROM caddy:2-alpine
COPY --from=ui-builder /ui/build/ /srv/
COPY Caddyfile /etc/caddy/Caddyfile
EXPOSE 3000